File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jframes

 
Fran Costigan
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you use multiple frames when creating a java GUI, and if so how do i go about doing so?
 
Ken Blair
Ranch Hand
Posts: 1078
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Create a second JFrame and make it visible using setVisible(true) the same way you did the first. You can also use a JDesktopPane and multiple JInternalFrames depending on what you want to do.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note: Use the setLocation(int x, int y) method so that the frames don't simply appear directly on top of one another.

Also, if you're interested in using JInternalFrames, see this tutorial: How to Use Internal Frames.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic