• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

swing using visual editor in eclipse

 
divya anand
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm learning to develop a small swing application using Visual Editor, that will have multiple frames. I'm kind of confused whether to have one single frame and change the content panels or have multiple frames for each user action. I tried all resources but could not find out how to invoke a new frame based on the action performed using the Visual editor in eclipse. If anyone could give me a hint or point to a good resource that would be of great help.

Thanks,
divya
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
divya anand wrote:I'm learning to develop a small swing application using Visual Editor, that will have multiple frames.

Hello! My first recommendation you may not like, but that's to first learn to code Swing without the visual editor. Learning to code Swing by hand and learning from the Swing tutorials will help you gain a deeper understanding of Swing and its structure and can only help you in the future even if you will be coding professionally with a visual editor (you'll understand better what the editor is doing and why).

I'm kind of confused whether to have one single frame and change the content panels or have multiple frames for each user action.

You'll probably want to model your application after other applications you are familiar with. Since most apps such as spreadsheets, word processors and the like don't have multiple frames zooming in and out of view, you may want to avoid this too -- though it all will depend ultimately on your requirements. If you haven't done so, please check out the Swing CardLayout tutorial which will show you how to more easily swap components held by a container.

I tried all resources but could not find out how to invoke a new frame based on the action performed using the Visual editor in eclipse. If anyone could give me a hint or point to a good resource that would be of great help.

If you absolutely need to open and display a new JFrame (or JDialog), again the tutorials will show you how to do this. To learn about JFrames, please have a look here:
Using Top Level Containers
How to Make Frames
Using Swing Components

Best of luck!
 
divya anand
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Stein,

Thank you so much for your valuable comments. I will check out the CardLayout and other tutorials. Thanks again.


Cheers,
Divya
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic