• Welcome to Valhalla Legends Archive.
 

[fixed]GUI Help

Started by Hdx, March 07, 2006, 12:27 AM

Previous topic - Next topic

Hdx

Fixed:
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);

}
}

~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status