In Java How would I create a world ie a window that is 800x6
In Java,
How would I create a world? i.e. a window that is 800x600 pixels.
This is what I have so far:
public static void main (String[] args)
{
World world1 = new World();
System.out.println(world1);
}
I keep getting \"cannot find symbol error\"
Apologies if this is a vague question. Thanks.
Solution
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
public class FrameClass {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setSize(800,600);
frame.setVisible(true);
frame.setTitle(\"Title\");
ImageIcon logoicon = new ImageIcon(\"star.png\");
Image logo = logoicon.getImage();
frame.setIconImage(logo);
}
}
![In Java, How would I create a world? i.e. a window that is 800x600 pixels. This is what I have so far: public static void main (String[] args) { World world1 = In Java, How would I create a world? i.e. a window that is 800x600 pixels. This is what I have so far: public static void main (String[] args) { World world1 =](/WebImages/42/in-java-how-would-i-create-a-world-ie-a-window-that-is-800x6-1129248-1761602898-0.webp)