0

I learn quickly by examples...

Where can I find a Java sample of GUI with button bar and change of active panel?

I have one toolbar working and I use Netbeans but I cant figure how to put more than one panel on the same position (below the button bar) and switch them by clicking on the buttons.

Thanks

fedeteka
  • 943
  • 1
  • 14
  • 33
  • *I learn quickly be examples...* I believe another way of saying this is "I learn quickly by people giving me full code solutions without me understanding it at all"? My suggestion is don't use a GUI builder because they're bad practice. Build the GUI by yourself without the assistance of a GUI builder. – Josh M Sep 11 '13 at 11:37
  • Can you provide an image of what your GUI looks like so far and try to point out more clearly what you actually want? – u3l Sep 11 '13 at 11:41
  • You may be looking for `CardPanel`, seen [here](http://stackoverflow.com/a/5655843/230513) in response to [Implementing back/forward buttons in Swing](http://stackoverflow.com/questions/5654926/implementing-back-forward-buttons-in-swing). – trashgod Sep 11 '13 at 11:46
  • "I learn quickly be examples... I believe another way of saying this is "I learn quickly by people giving me full code solutions without me understanding it at all"? My suggestion is don't use a GUI builder because they're bad practice. Build the GUI by yourself without the assistance of a GUI builder. – Josh M 1 hour ago" No sir! I dont ask code to solve my program... I only ask for any sample code to wathc and learn. I learn better on this way. Thanks for your suggestion anyway – fedeteka Sep 11 '13 at 13:08
  • "Can you provide an image of what your GUI looks like so far and try to point out more clearly what you actually want? – Trust 1 hour ago" Hello, this is my actual code: http://www.beetxt.com/X5y/ – fedeteka Sep 11 '13 at 13:11
  • "You may be looking for CardPanel, seen here in response to Implementing back/forward buttons in Swing. – trashgod 1 hour ago" Thanks a lot trashgod! – fedeteka Sep 11 '13 at 13:12
  • Thanks to the tip of the CardPanel I found cool samples... thanks a lot Trashgod Here 2 working samples, I hope it helps more people: http://java.about.com/od/Layout_Managers/ss/Cardlayout-Example-Program.htm and http://inforux.wordpress.com/2009/03/19/java-practicando-con-cardlayout/ – fedeteka Sep 11 '13 at 13:42
  • 1
    `Thanks to the tip of the CardPanel I found cool samples...` - start with the Swing tutorial on [How to Use Card Layout](http://docs.oracle.com/javase/tutorial/uiswing/layout/card.html). I'm not sure why people link to personal examples. The tutorial provide an example with an explanation as well as a table of contents for all other topics related to Swing which is an important reference. – camickr Sep 11 '13 at 14:56

0 Answers0