• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Scrollbar

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have page in which i have following:
(1)Three tables like Table1,Table2,Table3
(2) I have three Labels: L1,L2,L3 at the top of the page
(3) Now When I clicked L1, COmputer screen should jump to Table1 directly.When I clicked L2, computer screen should jump to Table2, and so on...
Plz let me know how can i do it...
Thanks,
Angela
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you need a JTabbedPane.
 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ji,
But I have to use AWT!
Thanks
angela

Originally posted by Jim Yingst:
Sounds like you need a JTabbedPane.


 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote an AWT tabbed panel a while back which I will try and dig up and put on a web site somewhere for you to grab and use. I'll put the URL here when I've found it.
 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frank ,
Plz let me know the site for AWT tabbed Panel,

Thanks again,
angela
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Angela,
If U just want to use Awt I have one solution
u can use it if it suits u
1. Create Three Tables on three different panels
Say Table-1 on Panel-1
Table-2 on Panel-2
Table-3 on Panel-3
and 3 buttons on some other Panel (panel4)
Panel 4 will always be visible
where only one of Panel-1, Panel-2, Panel-3
is visible depending on the Button pressed on the Panel 4
So on pressing Button-1 u can show just Panel-1
and make Panel 2 and 3 invisible
and on clicking Button 2 show panel 2
and so on
This concept is similar to Layers in HTML where u can show one layer over the other ..

bhuvan

Originally posted by Angela Jessi:
Hi,
I have page in which i have following:
(1)Three tables like Table1,Table2,Table3
(2) I have three Labels: L1,L2,L3 at the top of the page
(3) Now When I clicked L1, COmputer screen should jump to Table1 directly.When I clicked L2, computer screen should jump to Table2, and so on...
Plz let me know how can i do it...
Thanks,
Angela



[This message has been edited by bhuvan gupta (edited April 11, 2001).]
 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bhuvan,
angela

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suggest a simple solution. Use a Frame with a BorderLayout. Put the three labels in a Panel with a FlowLayout. Then put the panel in the NORTH of the Frame. After that, put the tables in a second Panel with a CardLayout. Then put the second Panel in the CENTER of the Frame. Then call the appropriate methods of the CardLayout to show the appropriate table when a user clicks the appropriate label. A CardLayout shows only one component at a time. Use a MouseListener to catch the mouse clicks.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeffrey's solution is probably the best answer... and guess what?!?!? I had some code lying around that is almost exactly what you need... hope it gives you some idea of how to implement your solution!

HTH,
-Nate
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic