• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New starter advice needed - JFrame programming

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I installed Windowsbuilder in Eclipse as described in this video:https://www.youtube.com/watch?v=oeswfZz4IW0&spfreload=1

To get starated I now want to create a simple JFrame application that works in the following way. On the opening screen I want to present 4 buttons. Based on the selection I want the JFrame to change layout and components so that the same JFrame behind the scenes contains 5 layouts but only one visible at any time. What is the best way to accomplish this? Or should I do this in another way using multiple JFrames or similar?
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't use either Windowsbuilder or Eclipse, but have you discovered the Oracle tutorials? There's a section on layouts that you will find interesting -- especially the part about CardLayout.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Darryl said. +1

As you have already found out DnD style tools are at best good for quick UI mock ups. Especially considering you are at a beginner stage, I would strongly recommend hand coding. Along with the link Darryl shared, also download and refer to the API docs. Almost all the swing components are peppered with How to use xxx e.g. http://docs.oracle.com/javase/tutorial/uiswing/components/table.html
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
reply
    Bookmark Topic Watch Topic
  • New Topic