Valhalla Legends Forums Archive | Java Programming | [fixed]GUI Help

AuthorMessageTime
HdxBmx27
Fixed:
[code]import javax.swing.JFrame;
import java.awt.Graphics;
import java.awt.Color;

public class Form extends JFrame {
public Form() {
super("Helo homies!");
this.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
this.setSize(300, 300);
this.setVisible(true);
setBackground(Color.BLACK);
}

public void paint(Graphics g){
getContentPane().setBackground(Color.BLACK);
g.setColor(Color.RED);
g.drawLine(10, 0, 200, 20);

}
}[/code]
~-~(HDX)~-~
March 7, 2006, 6:27 AM

Search