Hello forum, Vaironl here.

I'm making a fairly big application for my IB- Computer Science class, and I'm having allot of trouble with the screen.

I decided to use null layout to draw textfields, labels optionpanes, Jcomboboxes etc... a couple of things.

In my computer it looks like this
[IMG]http://img406.imageshack.us/img406/1593/recipepicture.jpg[/IMG]

But on my laptop, and my friend's desktop every component is larger, the top bar does not reach the end etc...
I knew this might happened but my teacher told me to not worry about screen res at the moment.
But it bothers me that the people testing the application will have problems and might not feel comfortable using it.

What is the best way to remake this screen without having to worry about the screen res?

If you are on a tight deadline, I would say to just carry on and worry about this after you've finished as your teacher has advised. You're not scored on this so you will limit the score you can achieve by delaying on this. If the components are huge on the laptop this just means she is using a very low resolution.

When using many components, a layout may have helped.

http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html

*You could change your layout based on a low resolution so you won't receive any problems from the higher resolution users.* Just slightly smaller components still in the right position and not off the form.

Another suggestion is to get the user's resolution using the getScreenSize method, and change the null layout based on the resolution - but a lot of time and extra un-needed code:

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

http://www.sightspecific.com/~mosh/Tricks/ScreenRes/

I wouldn't really advise this though. I would reduce your own resolution and modify the component positions based on that.

This is exactly one of the most basic reasons for using any layout manager except null. Any other layout manager will adjust your GUI to suit the resolution and font sizes of each machine.
But if you're on a tight deadline, and your teacher says don't worry about screen res, then don't worry. Just file this experience away as a learning for next time.

If you are on a tight deadline, I would say to just carry on and worry about this after you've finished as your teacher has advised. You're not scored on this so you will limit the score you can achieve by delaying on this. If the components are huge on the laptop this just means she is using a very low resolution.
.

Thanks. This is not a tight deadline therefore I will be able to fix it. I did not wanted the java standard look. But it will do ok, I just got to learn how to use it properly I seen wounderful applications made with it such as a minecraft skin maker.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.