Results 1 to 2 of 2
- 04-28-2010, 01:17 AM #1Member
- Join Date
- Apr 2010
- Rep Power
GUI - how do I get frames within a frame
Hi. What I want to do is to display some kind of java boxes within a JFrame.
At the moment I have a program that consists of a JFrame, JMenu and JButtons and the user can enter some text in a JTextArea. The user can also load or save text using JFileChooser.
The program displays statistics about the text. However, all of the display boxes/panes appear outside of the main JFrame.
What I want to do is display the various statistics and JFileChooser panes inside the JFrame.
I would be grateful if someone could give me some ideas as to how one goes about doing this.
You can use several JPanels and give them borders such as line borders or titled borders. Have a look at the BorderFactory API for more on this. There may be a tutorial for this as well, but I'm not sure.
Edit: yep -- How to use Borders
Edit 2: as for JFileChooser, since it is subclassed from JComponent, you can add one of these into your application as easily as you add a JPanel into it.
Last edited by Fubarable; 04-28-2010 at 02:04 AM.
- By imrankhan in forum AWT / SwingReplies: 3Last Post: 03-19-2012, 12:25 PM
- By vasug in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 04-16-2010, 05:00 PM
- By jonnytabpni in forum New To JavaReplies: 1Last Post: 11-08-2009, 10:12 PM
- By fletcher in forum AWT / SwingReplies: 7Last Post: 11-02-2009, 06:31 PM
- By ramesh.8189 in forum AWT / SwingReplies: 14Last Post: 02-15-2009, 08:12 AM