File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Calculator problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Calculator problem" Watch "Calculator problem" New topic

Calculator problem

Brian Snyder
Ranch Hand

Joined: Feb 03, 2001
Posts: 142
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

Joined: Jan 07, 1999
Posts: 6920
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 ...

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: Calculator problem
It's not a secret anymore!