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:
1 2
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