3
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by hfx642
Featured Replies
  • Short answer: yes. Longer answer: Java's GUI classes ("Swing") are more aimed at standard business applications, with a standard look and feel. Your panels will be pretty straightforward if you accept one of Java's standard looks. On the other hand you can draw shapes and images any way you want … Read More

3

Short answer: yes.
Longer answer: Java's GUI classes ("Swing") are more aimed at standard business applications, with a standard look and feel. Your panels will be pretty straightforward if you accept one of Java's standard looks. On the other hand you can draw shapes and images any way you want to get any exact appearance you desire, but that's more work.

0

Short answer: yes.
Longer answer: Java's GUI classes ("Swing") are more aimed at standard business applications, with a standard look and feel. Your panels will be pretty straightforward if you accept one of Java's standard looks. On the other hand you can draw shapes and images any way you want to get any exact appearance you desire, but that's more work.

So by, "more work", are you pointing to absolute positioning? Geometry?

0

To go beyond the standard look and feel components you have to replace their "paint" code with painting code of your own that draws them explicitly using lines,rectangles, ellipses and more complex shapes. Exactly how/where you do that depends on how clever you want your panels to be, but whichever way you are involved in a lot of pretty detailed graphics drawing methods. Have a look at these for a flavour of the kind of methods you'll need
http://download.oracle.com/javase/7/docs/api/java/awt/Graphics.html
http://download.oracle.com/javase/7/docs/api/java/awt/Graphics2D.html

0

To get things to display in the manner you want,
you can combine several JPanels with different layout managers.
Quite often, I'll do Grids... inside of Borders... inside of Grids... etc.
I usually wrap all (each) of my non-Flow JPanels with Flow JPanels.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.