Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create new screen instead of dialog for GUI

 
Li zhai
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I have some quesiton about the GUI.

If the buttons "search", "book", "showall" are placed below the JTable (JTable show all records). When the "search" button is clicked, instead of popup a dialog or place "search" button in the same screen of JTable, is that possible to generate a screen which replace JTable and show the combo box to ask user to input the "location" or/and "name" and "submit", then show the result? I hate to popup dialogs for every clicks anyway.

Could anyone help me? I am looking forward to hearing from you ASAP. Thanks.
 
Roy Mallard
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to add and remove components dynamically without too much trouble (although your GUI sounds weird to me).
To remove components from your JPanel, just use getContentPane().remove(itemToRemove).
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo,

You can use the CardLayout to change you display page.
But normaly you display it and then enable/disable the components.
Can you provide some more details (about the reasons, which component you remove/add.etc)

Regards M
[ July 24, 2006: Message edited by: Mihai Radulescu ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic