permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes That L&F Thing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "That L&F Thing" Watch "That L&F Thing" New topic
Author

That L&F Thing

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I decided I'd post it anyways... in case others can get use from it.
Normally in a UI Program I would write, I'd override the getInsets method. This allows you to leave an edge between the frame edge and the components inside. I don't like seeing labels start at the extreme left edge of a window. But in this case, because of the L&F changing, I've commented that code out. Uncomment it and run to see what happens!
BTW: this code was modified from another source: Deitel&Deitel's textbook Java2 How To Program
Joseph Russell
Ranch Hand

Joined: Jan 08, 2001
Posts: 290
Thanks when I get back I'll play with this. What page is this on in Deitel's book? I have the book so just curious.
Thanks,
Joe
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Section 13.10, starting on page 661
Joseph Russell
Ranch Hand

Joined: Jan 08, 2001
Posts: 290
I uncommented your getInsets() and it looks okay when it runs in metal but looked funny in windows and kinda funny in motif because I have a brown border with the blue button and blue background.
Joe
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: That L&F Thing
 
Similar Threads
urgent:override a jrame
JCheckBox Allowable Selections
moving labels
regarding popup menu!
To load the image in Applet