Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calculator problem

 
Brian Snyder
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to make a calculator that has a text field in top and then two pnels next to each other below it. Right now, it puts all three right under one another.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is because the containnig panel uses the default FlowLayout. If you force that to be another such as GridLayout or BorderLayout, using setLayout, you can choose how they are laid out. You are nearly there ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic