File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22<classpath >
33 <classpathentry kind =" src" path =" src" />
44 <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" />
5- <classpathentry kind =" lib" path =" D:/Program Files/ eclipse/log4j-1.2.17.jar" />
6- <classpathentry kind =" lib" path =" D:/Program Files/ eclipse/lombok.jar" />
5+ <classpathentry kind =" lib" path =" D:/eclipse/log4j-1.2.17.jar" />
6+ <classpathentry kind =" lib" path =" D:/eclipse/lombok.jar" />
77 <classpathentry kind =" output" path =" bin" />
88</classpath >
Original file line number Diff line number Diff line change 1+ package com .bjsxt .regex .test ;
2+
3+ import java .util .regex .Matcher ;
4+ import java .util .regex .Pattern ;
5+
6+ public class Demo01 {
7+ public static void main (String [] args ) {
8+ //表达式对象
9+ Pattern p = Pattern .compile ("\\ w+" );
10+ //创建Matcher对象
11+ Matcher m =p .matcher ("aaasdasdasfas" );
12+ boolean yesorno =m .matches ();
13+ System .out .println (yesorno );
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ package com .xinan .swing ;
2+
3+ import java .awt .BorderLayout ;
4+ import java .awt .EventQueue ;
5+
6+ import javax .swing .JFrame ;
7+ import javax .swing .JPanel ;
8+ import javax .swing .border .EmptyBorder ;
9+
10+ public class Hello extends JFrame {
11+
12+ private JPanel contentPane ;
13+
14+ /**
15+ * Launch the application.
16+ */
17+ public static void main (String [] args ) {
18+ EventQueue .invokeLater (new Runnable () {
19+ public void run () {
20+ try {
21+ Hello frame = new Hello ();
22+ frame .setVisible (true );
23+ } catch (Exception e ) {
24+ e .printStackTrace ();
25+ }
26+ }
27+ });
28+ }
29+
30+ /**
31+ * Create the frame.
32+ */
33+ public Hello () {
34+ setDefaultCloseOperation (JFrame .EXIT_ON_CLOSE );
35+ setBounds (100 , 100 , 450 , 300 );
36+ contentPane = new JPanel ();
37+ contentPane .setBorder (new EmptyBorder (5 , 5 , 5 , 5 ));
38+ contentPane .setLayout (new BorderLayout (0 , 0 ));
39+ setContentPane (contentPane );
40+ }
41+
42+ }
Original file line number Diff line number Diff line change 1+ package com .xinan .swing ;
2+
3+ import java .awt .EventQueue ;
4+
5+ import javax .swing .JInternalFrame ;
6+
7+ public class Hello1 extends JInternalFrame {
8+
9+ /**
10+ * Launch the application.
11+ */
12+ public static void main (String [] args ) {
13+ EventQueue .invokeLater (new Runnable () {
14+ public void run () {
15+ try {
16+ Hello1 frame = new Hello1 ();
17+ frame .setVisible (true );
18+ } catch (Exception e ) {
19+ e .printStackTrace ();
20+ }
21+ }
22+ });
23+ }
24+
25+ /**
26+ * Create the frame.
27+ */
28+ public Hello1 () {
29+ setBounds (100 , 100 , 450 , 300 );
30+
31+ }
32+
33+ }
You can’t perform that action at this time.
0 commit comments