displaying image in jframe using (x,y) coordinates
From: Ahsan Rabbani (ahsan.rabbani_at_utoronto.ca)
Date: 01/31/04
- Next message: Matt Humphrey: "Re: Process Runtime.exec causes subprocess hang."
- Previous message: Berlin Brown: "Re: Join Us for the 2004 No Fluff Just Stuff Java Symposium Tour"
- Next in thread: Andrew Thompson: "Re: displaying image in jframe using (x,y) coordinates"
- Reply: Andrew Thompson: "Re: displaying image in jframe using (x,y) coordinates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jan 2004 15:56:27 -0800
I've searched hours for this but can't seem to find how to do this
anywhere.. Please help me out if anyone knows how I can do this..
If I have the following code, how can I display lets say, "icon.gif"
at (200,300)?
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class RoundTableGUI {
public static void main(String[] args) {
JFrame gui = new JFrame("RoundTableWorld");
gui.setSize(500,500);
gui.setLocation(60,60);
gui.setVisible(true);
gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
I'd appreciate any help, thanks.
- Next message: Matt Humphrey: "Re: Process Runtime.exec causes subprocess hang."
- Previous message: Berlin Brown: "Re: Join Us for the 2004 No Fluff Just Stuff Java Symposium Tour"
- Next in thread: Andrew Thompson: "Re: displaying image in jframe using (x,y) coordinates"
- Reply: Andrew Thompson: "Re: displaying image in jframe using (x,y) coordinates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]