java help

so im trying to make a virtual iphone but i dont know how to convert the current size to inches (im not even sure what measurements im using for this i think its pixels.) this is the code im using:
JLabel textLabel = new JLabel("I'm a label in the window",SwingConstants.CENTER);
textLabel.setPreferredSize(new Dimension(450, 250));

and i need it to be 4.5 inches tall by 2.25 inches wide
Maybe multiply the size in inches by the DPI of the screen?
whats dpi?
Dots per inch
so what do i need to multiply by to get the dpi?
Topic archived. No new replies allowed.