Hi.
i am currently learning GUI.
have learn how to draw button, panel, frames
but the problem was, when i run the simple program.
all the interface is not drawn properly, or atleast it is draw very slowly
and not reacting to action fast enough..
There must be a way to fix this, can any1 tell me?
here is my simple code, but gui is slow and not responding well when i drag
it in side the monitor;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Frame1 extends JFrame{
JPanel jPanel1 = new JPaneal();
JButton jButton1 = new JButton();
public Frame1(){
super("example");
setSize(500,500);
this.getContentpane().add(jPanel1, BorderLayout.SOUTH);
jPanel1.add(jButton1);
public static void main(String[] args){
Frame1 frame1 = new Frame1();
frame1.setVisible(true);
}
}
thanks alot
Leon