1、完成了jdbc连接mysql数据库的代码
2、class MyComponent extends JComponent
public void paintComponent(Graphics g)
{
code for drawing
复制代码
}
当窗口被极小化或扩大或被另一个窗口覆盖时 需要重新绘制 (自动调用)
3、ActionListener istener=,,,;
JButton button = new JButton("OK");
button.addActionListener(listener);
class MyListener implements ActionListener
{
...
public void actionPerformed(ActionEvent event)
{
//reaction to button click goer here
...
}
}
复制代码
4、