Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

New starter advice needed - JFrame programming  RSS feed

 
Jim Swenson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • 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
 
Campbell Ritchie
Sheriff
Posts: 55298
156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!