Hi all,
I have this code:
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension screen = tk.getScreenSize();
if(((height=screen.getHeight())>=768)&&
((width=screen.getWidth())>=1024))
{
//Do nothing. Variables width and height already set inside if condition.
}
where variables height and width are in pixels.
However in another part of my program i want to set the position of a JLabel . From what i understand the setPosition method requires cm.
Can anyone tell me how to convert pixels to cm in a safe way.
Thanks in advance.