当前位置: 技术问答>java相关
这段程序有问题么?怎么button怎么不能点击呢?
来源: 互联网 发布时间:2015-08-01
本文导语: 这段程序有问题么?怎么button怎么不能点击呢? import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Test extends JFrame { JButton jbstop; public Test() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { ...
这段程序有问题么?怎么button怎么不能点击呢?
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Test extends JFrame
{
JButton jbstop;
public Test() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception
{
Container contentPane = getContentPane();
JPanel pane1 = new JPanel();
JButton jbstart = new JButton("start");
jbstop = new JButton("stop");
this.setTitle("cortrol");
JLabel jlabel1 = new JLabel("日志文件保存时间:");
JLabel jlabel2 = new JLabel("天");
JLabel jlabel3 = new JLabel("每天");
JLabel jlabel4 = new JLabel("点开始检查删除日志文件");
JTextField jtxtField = new JTextField();
JComboBox jComboBox1 = new JComboBox();
JTextArea jtxtArea = new JTextArea();
for(int i=1;i
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Test extends JFrame
{
JButton jbstop;
public Test() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception
{
Container contentPane = getContentPane();
JPanel pane1 = new JPanel();
JButton jbstart = new JButton("start");
jbstop = new JButton("stop");
this.setTitle("cortrol");
JLabel jlabel1 = new JLabel("日志文件保存时间:");
JLabel jlabel2 = new JLabel("天");
JLabel jlabel3 = new JLabel("每天");
JLabel jlabel4 = new JLabel("点开始检查删除日志文件");
JTextField jtxtField = new JTextField();
JComboBox jComboBox1 = new JComboBox();
JTextArea jtxtArea = new JTextArea();
for(int i=1;i