File tree Expand file tree Collapse file tree 2 files changed +35
-3
lines changed
Expand file tree Collapse file tree 2 files changed +35
-3
lines changed Original file line number Diff line number Diff line change 1+ package mypkg ;
2+
3+ import java .awt .*;
4+ import javax .swing .*;
5+
6+ class MyFrame extends JFrame {
7+ JPanel jp ;
8+ JButton btn ;
9+ JLabel label ;
10+ public MyFrame ()
11+ {
12+ this .setVisible (true );
13+ this .setSize (250 , 220 );
14+ this .setVisible (true );
15+ this .setLocation (400 , 200 );
16+ this .setDefaultCloseOperation (JFrame .EXIT_ON_CLOSE );
17+ InitPanel (new JPanel ());
18+ }
19+ public void InitPanel (JPanel jp )
20+ {
21+ btn = new JButton ("btn" );
22+ label = new JLabel ("label" );
23+ jp .add (btn );
24+ jp .add (label );
25+ add (jp );
26+ }
27+ public static void main (String [] args )
28+ {
29+ MyFrame mf = new MyFrame ();
30+ return ;
31+ }
32+ }
Original file line number Diff line number Diff line change 33set JAVA_HOME = D:\Program Files\Java\jdk-12.0.2
44set PATH = %PATH% ;%JAVA_HOME% \bin;
55
6- set srcs = ForScanner.java ForScannerChild.java TxtParseUtils.java ServerThread.java SocketClient.java SocketServer.java
6+ set srcs = ForScanner.java ForScannerChild.java TxtParseUtils.java ServerThread.java SocketClient.java SocketServer.java MyFrame.java
77
88for %%i in (%srcs% ) do (
99 javac -encoding utf-8 -h . %%i
1010 if not %errorlevel% == 0 (
1111 goto proc_err
1212 ) else (
13+ mkdir mypkg
14+ move *.class mypkg
1315 echo %%i succ.................................
1416 )
1517)
16- mkdir mypkg
17- move *.class mypkg
1818
1919rem java mypkg.SocketServer
2020
You can’t perform that action at this time.
0 commit comments