User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 427,159 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,911 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting

Help with a reservation program! GUI Messed XD

Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation: server_crash is on a distinguished road 
Rep Power: 9
Solved Threads: 18
server_crash's Avatar
server_crash server_crash is offline Offline
Postaholic

Re: Help with a reservation program! GUI Messed XD

  #4  
Jun 1st, 2005
Alright, I see what your saying now. At first I was going to say some nested JPanels, but I think it's too good of a project to go down that road. Since you need a lot of control as to were these components go, I would suggest using the setBounds() method. It lets you place components anywere you like; it even lets you decide the width and the height of the component. Of course it will take some trial and error to get the components were you like! Anyways, the project looks great so far. I can tell you've spent a lot of time on it. Keep up the good work.

Here is a sample of the setbounds:

JButton btn = new JButton("Button");
btn.setBounds(30,30,60,40);

The setbounds looks like this:
setBounds(int X, int Y, int width, int height);


Now, with the setbounds, you DON'T use a layout manager. You simply set the layout manager to null.
setLayout(null);

It's important to remember that.
Reply With Quote  
All times are GMT -4. The time now is 8:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC