Demo entry 6630916

asd

   

Submitted by anonymous on Jul 11, 2017 at 11:47
Language: Java. Code size: 1.1 kB.

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*;
import java.net.*;
import java.util.Scanner;

/**
 * Created by XiaoKeAi on 2017/7/2.
 */

public class GUI1 {
    private JLabel title;
    private JLabel nowNum;
    private JPanel Panel;
    private JLabel nowNumValid;
    private JButton a1Button;

    GameServer gs = new GameServer();
//    int s = gs.getStartNum();
//    String ss = String.valueOf(s);

    public GUI1(){
//        nowNumValid.setText(ss);
        a1Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                methodA();
            }
        });
    }

    public static void main(String[] args) {
        JFrame frame = new JFrame("GUI1");
        frame.setContentPane(new GUI1().Panel);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);


    }

    public void methodA(){

    }
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).