Results 1 to 3 of 3
- 04-04-2011, 05:38 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 1
- Rep Power
- 0
Jpanels with in Jpanels and no flow layout just postion
so I have two class that has extend Jpanel
MasterPanel Extends Jpanel()
InsidePanelExends Jpanel()
so if try to do InsidePAnel.setLocation()
masterPanel.add(InsidePanel);
it doesn't let me move the panel around inside the other panel.
how do I add components with out using layoutsLast edited by Nemus; 04-04-2011 at 05:46 AM.
- 10-03-2011, 03:27 PM #2
- Join Date
- Aug 2011
- Location
- Pretoria, South Africa
- Posts
- 27
- Blog Entries
- 4
- Rep Power
- 0
Re: Jpannels with in Jpannels and no flow layout just postion
o my... over 200 views and not a single reply???
I hope this can help you.
first set the masterPanel layout to null.
when you set the containers layout to null remember to set every object within the container bounds. like so.Java Code:masterPanel.setLayout(null);
Java Code:masterPanel mP = new masterPanel(); mP .setLayout(null); insidePanel iP = new insidePanel(); iP.setBounds(0, 0, 20, 20); mP.add(iP);
- 10-03-2011, 03:45 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,398
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Custom JButton with flow layout
By phil128 in forum AWT / SwingReplies: 1Last Post: 01-17-2011, 10:44 PM -
How to generate Data Flow Diagram(Work Flow Diagram)
By stsivaraj in forum AWT / SwingReplies: 1Last Post: 12-22-2010, 11:21 PM -
request flow across the page
By Riyaz.hk77 in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 12-07-2010, 08:20 PM -
stack over flow error
By sara12345 in forum New To JavaReplies: 3Last Post: 04-14-2010, 09:50 PM -
program flow
By loktamu in forum AWT / SwingReplies: 1Last Post: 09-17-2008, 04:52 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks