Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

That L&F Thing

 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Section 13.10, starting on page 661
 
Joseph Russell
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic