Results 1 to 9 of 9
Thread: How to add JFrame inside JPanel
- 02-19-2009, 06:05 AM #1
Member
- Join Date
- Feb 2009
- Posts
- 5
- Rep Power
- 0
-
The answer is: just don't do it. You can't do it, and you would never have a reason to do this. Ever.
Please study the Sun Swing tutorials to learn more about just what a JFrame, JPanel and JApplet are and why this isn't feasible nor recommended. You'll also learn a lot more about how to create Swing GUIs through the tutorials.
-
Out of morbid curiosity, I have to ask: what are you trying to achieve here? Why would you want to place a root pane into a Container, a JPanel?
- 02-19-2009, 06:59 AM #4
Just another cross poster.
Java 2D - Can we add JFrame to JPanel?
db
- 02-24-2009, 04:56 PM #5
Member
- Join Date
- Feb 2009
- Posts
- 3
- Rep Power
- 0
you cannot have a JPanel in JFrame it is the other way around
- 04-02-2009, 02:59 PM #6
Member
- Join Date
- Apr 2009
- Posts
- 8
- Rep Power
- 0
this is my problem 2, take a look last post
- 12-13-2009, 07:51 PM #7
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
I think the reason might be the same as what I have just come across. I am trying to put JButtons, TextFields, etc. in a tabbed panel.
So I came across this post looking for how to add JFrame components to a JPanel.
Can anyone clarify for me and the OP how to put Jcomponents in the tabbed panel?
I'm starting with this demo.
Well it won't let me post the link but it's the tabbedPaneDemo.java provided by sun
All it is is empty tabbed panels. So how do I put components in it?
Thanks
-
Hello, and welcome to the forum. I respectfully ask however that you re-ask your question in its own new thread. Thanks for your cooperation.
edit: the key to answering this question is in the addTab method. Again, if you post your question in a new thread, I'll be happy to provide you with the details.Last edited by Fubarable; 12-13-2009 at 08:38 PM.
- 12-13-2009, 08:41 PM #9
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Launch native app inside a JFrame???
By benedums in forum Advanced JavaReplies: 6Last Post: 02-25-2011, 03:23 PM -
scroll a Jpanel in a JFrame
By nidhirastogi in forum SWT / JFaceReplies: 1Last Post: 09-07-2008, 03:42 AM -
How To Add A Jbutton Inside A Rectangle
By SANDY_INDIA in forum AWT / SwingReplies: 9Last Post: 07-06-2008, 08:06 AM -
string inside of a xml
By Heather in forum XMLReplies: 2Last Post: 03-28-2008, 05:21 PM -
How to call JSP inside Servlet
By Swamipsn in forum Advanced JavaReplies: 0Last Post: 07-31-2007, 12:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks