I have created one frame and displaying an image into frame. but I am unable set the size of a frame. As i have tried following code, but its giving me the part of image i have set, Not the whole image. Please help me to re-size the image.
JFrame frame = new JFrame("My Window");
frame.setSize(200,200);
int frameWidth = 200;
int frameHeight = 200;
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
frame.setBounds((int) screenSize.getWidth() - frameWidth, 0, frameWidth, frameHeight);
frame.pack();
frame.setVisible(true);