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

screen resolution problem

 
prabhu ganapathylingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem with screen resolution. my project screen resolution is changing from one system to another system.
help me
 
Kevin Workman
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prabhu ganapathylingam wrote:I have a problem with screen resolution. my project screen resolution is changing from one system to another system.
help me


What do you mean by "project screen resolution"? You mean the screen resolution of the systems are different? That's expected. What is happening? What do you want to happen instead?
 
prabhu ganapathylingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply.

I have created a project in 1024X768 screen resolution. but the screen resolution is changed, the size of the panels in the frame are not changed according to the resolution. what I am trying to says is i want to run my project in any screen resolution with the same size or the size of the control are changed according to the resolution.
 
Kevin Workman
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prabhu ganapathylingam wrote:thanks for your reply.

I have created a project in 1024X768 screen resolution. but the screen resolution is changed, the size of the panels in the frame are not changed according to the resolution. what I am trying to says is i want to run my project in any screen resolution with the same size or the size of the control are changed according to the resolution.


Can I ask why you want this? I should point out that the components are the same size as measured in pixels. Chances are, you should probably not bother trying to force your application to do something like this: it's up to the user, and it's that way for a reason.
 
prabhu ganapathylingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the user change the resolution it will reflect the application also. Because, i have given the set bounds to the panels. if the resolution is changed the the application is not look good. So that, i am trying to change this according to screen resolution.
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a proper layout managers (or multiple) next time. BorderLayout, FlowLayout, GridLayout, they all know how to handle resizes of the parent container. But it seems like you have used a null layout manager and are calling setBounds directly. That won't resize your controls, no.

As for which layout manager is best, you'll have to experiment. Check out the Java tutorial about it. Don't be afraid to add a JPanel with a different layout manager to some JPanel. Nested panels with different layout managers is very usual in AWT and Swing programming.

Oh, and moving to our GUI forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic