Results 1 to 5 of 5
Thread: non-rectangle JPanel
- 04-30-2009, 05:41 PM #1
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
- 04-30-2009, 06:11 PM #2
No. You can make JFrames will funky shapes in Java 6, but that just involves making parts of a square frame transparent.
For your situation, just make a JPanel the size of the bigger rectangle and put whatever goes in that gap in the corner.
Java Code:****** ### ****** ****** + ### = ****** ****** ***### ****** ***###
Last edited by OrangeDog; 04-30-2009 at 06:14 PM. Reason: alignment
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 04-30-2009, 06:20 PM #3
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
The problem I have two panels: 1 i mark with ## and the other I mark wiht xx
I want layout liek that
####
##xx
##xx
If i set bound of panel ### to be 3*4 - then every change I made in the panel will cause the second panel (xxx) to dsiapear
- 04-30-2009, 06:35 PM #4
Put panel xxx inside panel ###.
Avoid using setBounds() for layout, use a LayoutManager instead.Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 04-30-2009, 11:58 PM #5
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
Similar Threads
-
How to draw a rectangle in the JPanel by inserting the X and Y
By ngansamuel in forum New To JavaReplies: 2Last Post: 03-22-2009, 01:53 PM -
How to Fill a Rectangle in Java
By Java Tip in forum java.awtReplies: 0Last Post: 06-22-2008, 11:10 PM -
How to Draw a Rectangle in Java
By Java Tip in forum java.awtReplies: 0Last Post: 06-22-2008, 11:09 PM -
Rectangle Intersection
By Gwindow in forum Java 2DReplies: 1Last Post: 04-24-2008, 03:53 PM -
help with rectangle class
By darkgt in forum New To JavaReplies: 7Last Post: 11-14-2007, 06:19 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks