@@ -17,113 +17,8 @@ Rustam_Z🚀, 9.10.2020
17
17
18
18
- Design Patterns, SOLID Principles- https://youtu.be/A1PWJB98qcw
19
19
20
- ## Java GUI
20
+ - [ Java Swing ] ( java-swing )
21
21
22
- ### GUI Basics
23
- - [ Lecture Notes] ( lecture-notes/GUI_Basics.ppt )
22
+ - JavaFX
24
23
25
- - [ Swing Notes] ( lecture-notes/Creating_User_Interfaces_Swing.ppt )
26
-
27
- - Swing (interface) vs. AWT (event handling)
28
-
29
- - ``` java
30
- import javax.swing.* ;
31
-
32
- public class MyFrame {
33
- public static void main (String [] args ) {
34
- JFrame frame = new JFrame (" Test Frame" );
35
- frame. setSize(400 , 300 );
36
- frame. setLocationRelativeTo(null );
37
- frame. setVisible(true );
38
- frame. setDefaultCloseOperation(JFrame . EXIT_ON_CLOSE );
39
- }
40
- }
41
- ```
42
-
43
- - ```java
44
- import javax.swing.* ;
45
-
46
- public class MyFrameWithComponents {
47
- public static void main (String [] args ) {
48
- JFrame frame = new JFrame ( " MyFrameWithComponen" )
49
-
50
- JButton jbtOK = new JButton (" OK" ); // Add a button into the frame
51
- frame. add(jbtOK);
52
-
53
- frame. setSize(400 , 300 );
54
- frame. setDefau1tC10seOperation(JFrame . EXIT_ON_CLOSE );
55
- frame. setLocationRe1ativeTo(nu11); // Center the frame
56
- frame. setVisib1e(true );
57
- }
58
- }
59
- ```
60
- - [JFrame with inheritence](programs/ MyFrame1 . java)
61
-
62
- ### Layout Manager
63
- - For arraning a position into containers
64
-
65
- - [FlowLayout ](programs/ ShowFlowLayout . java)
66
-
67
- - [GridLayout ](programs/ ShowGridLayout . java)
68
-
69
- - [BorderLayout ](programs/ ShowBorderLayout . java)
70
-
71
- - `Color ` class
72
- - ```java
73
- Color mycolor = new Color (228 , 100 , 50 );
74
- // how to set for button
75
- mybutton. setBackground(Color . mycolor);
76
- mybutton. setForeground(Color . mycolor);
77
- ```
78
-
79
- ### JPanel
80
- - In `JFrame ` we add a component `JPanel `
81
-
82
- - [TestPanels ](programs/ TestPanels . java)
83
-
84
- ### Event - Handling in Java (Event - Driven Programming )
85
-
86
- - [Lecture Notes ](lecture- notes/ Event - Driven_Programming . ppt)
87
-
88
- - Event - driven programming (depends of action) < - > procedural programming (step by step)
89
-
90
- - [HandleEvent ](programs/ HandleEvent . java)
91
-
92
- - [HandleEvent1 ](programs/ HandleEvent1 . java) with the use of Inner Classes
93
-
94
- - ```
95
- User Action Object Generated
96
-
97
- Click a button JButton ActionEvent
98
- Click a check box JCheckBox ItemEvent , ActionEvent
99
- Click a radio button JRadioButton ItemEvent , ActionEvent
100
- Press return on a text field JTextField ActionEvent
101
- Select a new item JComboBox ItemEvent, ActionEvent
102
- Window opened, closed, etc. Window WindowEvent
103
- Mouse pressed, released, etc. Component MouseEvent
104
- Key released, pressed, etc. Component KeyEvent
105
- ```
106
-
107
- - ```
108
- Event Class Listener Interface Listener Methods (Handlers )
109
- ActionEvent ActionListener actionPerformed(ActionEvent )
110
- ItemEvent ItemListener itemStateChanged(ItemEvent )
111
- WindowEvent WindowListener windowClosing(WindowEvent )
112
- windowOpened(WindowEvent )
113
- windowIconified(WindowEvent )
114
- windowDeiconified(WindowEvent )
115
- windowClosed(WindowEvent )
116
- windowActivated(WindowEvent )
117
- windowDeactivated(WindowEvent )
118
- ContainerEvent ContainerListener componentAdded(ContainerEvent )
119
- componentRemoved(ContainerEvent )
120
- MouseEvent MouseListener mousePressed(MouseEvent )
121
- mouseReleased(MouseEvent )
122
- mouseClicked(MouseEvent )
123
- mouseExited(MouseEvent )
124
- mouseEntered(MouseEvent )
125
- KeyEvent KeyListener keyPressed(KeyEvent )
126
- keyReleased(KeyEvent )
127
- keyTypeed(KeyEvent )
128
-
129
- ```
24
+ - [ Collections Framework] ( collections-framework )
0 commit comments