├── .gitignore
├── Calculator
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ └── com
│ │ └── masai
│ │ └── Main
│ │ ├── Main$1.class
│ │ ├── Main$2.class
│ │ ├── Main$3.class
│ │ ├── Main$4.class
│ │ ├── Main$5.class
│ │ └── Main.class
└── src
│ └── com
│ └── masai
│ └── Main
│ └── Main.java
├── ComboBox
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ └── com
│ │ └── masai
│ │ └── main
│ │ ├── ComboBox$1.class
│ │ └── ComboBox.class
└── src
│ └── com
│ └── masai
│ └── main
│ └── ComboBox.java
├── Image_As_Label
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ ├── com
│ │ └── masai
│ │ │ └── Main
│ │ │ ├── ImageLabel$1.class
│ │ │ ├── ImageLabel$2.class
│ │ │ └── ImageLabel.class
│ └── images
│ │ ├── password.png
│ │ ├── user.png
│ │ └── user2.png
└── src
│ ├── com
│ └── masai
│ │ └── Main
│ │ └── ImageLabel.java
│ └── images
│ ├── password.png
│ ├── user.png
│ └── user2.png
├── List_IMPORTANT
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ └── com
│ │ └── masai
│ │ └── list
│ │ ├── list$1.class
│ │ ├── list$2.class
│ │ └── list.class
└── src
│ └── com
│ └── masai
│ └── list
│ └── list.java
├── PageRedirecting
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ └── com
│ │ └── masai
│ │ └── Main
│ │ ├── LoginPage$1.class
│ │ └── LoginPage.class
└── src
│ └── com
│ └── masai
│ └── Main
│ └── LoginPage.java
├── PasswordField
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ └── com
│ │ └── masai
│ │ └── Main
│ │ ├── Password$1.class
│ │ ├── Password$2.class
│ │ └── Password.class
└── src
│ └── com
│ └── masai
│ └── Main
│ └── Password.java
├── README.md
├── RadioButton_And_CheckBox
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ └── com
│ │ └── masai
│ │ └── Main
│ │ ├── Example$1.class
│ │ ├── Example$10.class
│ │ ├── Example$2.class
│ │ ├── Example$3.class
│ │ ├── Example$4.class
│ │ ├── Example$5.class
│ │ ├── Example$6.class
│ │ ├── Example$7.class
│ │ ├── Example$8.class
│ │ ├── Example$9.class
│ │ └── Example.class
└── src
│ └── com
│ └── masai
│ └── Main
│ └── Example.java
├── Sample_Project
├── .classpath
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── bin
│ └── com
│ │ └── masai
│ │ └── components
│ │ ├── component1$1.class
│ │ ├── component1$2.class
│ │ └── component1.class
└── src
│ └── com
│ └── masai
│ └── components
│ └── component1.java
└── javswing.png
/.gitignore:
--------------------------------------------------------------------------------
1 | /.metadata/
2 |
--------------------------------------------------------------------------------
/Calculator/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Calculator/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Calculator
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Calculator/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/Calculator/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/Calculator/bin/com/masai/Main/Main$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Calculator/bin/com/masai/Main/Main$1.class
--------------------------------------------------------------------------------
/Calculator/bin/com/masai/Main/Main$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Calculator/bin/com/masai/Main/Main$2.class
--------------------------------------------------------------------------------
/Calculator/bin/com/masai/Main/Main$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Calculator/bin/com/masai/Main/Main$3.class
--------------------------------------------------------------------------------
/Calculator/bin/com/masai/Main/Main$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Calculator/bin/com/masai/Main/Main$4.class
--------------------------------------------------------------------------------
/Calculator/bin/com/masai/Main/Main$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Calculator/bin/com/masai/Main/Main$5.class
--------------------------------------------------------------------------------
/Calculator/bin/com/masai/Main/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Calculator/bin/com/masai/Main/Main.class
--------------------------------------------------------------------------------
/Calculator/src/com/masai/Main/Main.java:
--------------------------------------------------------------------------------
1 | package com.masai.Main;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.JFrame;
6 | import java.awt.Color;
7 | import javax.swing.JTextField;
8 | import java.awt.BorderLayout;
9 | import java.awt.Font;
10 | import javax.swing.JButton;
11 | import java.awt.event.ActionListener;
12 | import java.awt.event.ActionEvent;
13 | import javax.swing.SwingConstants;
14 | import javax.swing.JLabel;
15 | import javax.swing.JOptionPane;
16 |
17 | import java.awt.SystemColor;
18 |
19 | public class Main {
20 |
21 | private JFrame frame;
22 | private JTextField textField;
23 | private JTextField textField_1;
24 | private JTextField txtAnswer;
25 |
26 | /**
27 | * Launch the application.
28 | */
29 | public static void main(String[] args) {
30 | EventQueue.invokeLater(new Runnable() {
31 | public void run() {
32 | try {
33 | Main window = new Main();
34 | window.frame.setVisible(true);
35 | } catch (Exception e) {
36 | e.printStackTrace();
37 | }
38 | }
39 | });
40 | }
41 |
42 | /**
43 | * Create the application.
44 | */
45 | public Main() {
46 | initialize();
47 | }
48 |
49 | /**
50 | * Initialize the contents of the frame.
51 | */
52 | private void initialize() {
53 | frame = new JFrame();
54 | frame.getContentPane().setFont(new Font("Trebuchet MS", Font.BOLD, 28));
55 | frame.getContentPane().setBackground(SystemColor.activeCaption);
56 | frame.getContentPane().setLayout(null);
57 |
58 | textField = new JTextField();
59 | textField.setFont(new Font("Tahoma", Font.BOLD, 27));
60 | textField.setBounds(176, 172, 170, 40);
61 | frame.getContentPane().add(textField);
62 | textField.setColumns(10);
63 |
64 | textField_1 = new JTextField();
65 | textField_1.setFont(new Font("Tahoma", Font.BOLD, 27));
66 | textField_1.setColumns(10);
67 | textField_1.setBounds(743, 172, 170, 40);
68 | frame.getContentPane().add(textField_1);
69 |
70 | JButton btnNewButton = new JButton("Addition");
71 | btnNewButton.setFont(new Font("Arial", Font.BOLD, 20));
72 | btnNewButton.setBackground(new Color(0, 128, 255));
73 | btnNewButton.addActionListener(new ActionListener() {
74 | public void actionPerformed(ActionEvent e) {
75 | int n = 0;
76 | int n2 = 0;
77 |
78 | try {
79 |
80 | n = Integer.parseInt(textField.getText());
81 | n2 = Integer.parseInt(textField_1.getText());
82 | String result = (n+n2)+"";
83 |
84 | txtAnswer.setText(result);
85 |
86 | textField.setText(null);
87 | textField_1.setText(null);
88 |
89 | } catch (Exception e2) {
90 |
91 | JOptionPane.showMessageDialog(null, "Enter Valid Number");
92 | textField.setText(null);
93 | textField_1.setText(null);
94 | txtAnswer.setText("Answer");
95 | }
96 |
97 |
98 |
99 |
100 |
101 | }
102 | });
103 | btnNewButton.setBounds(54, 299, 164, 40);
104 | frame.getContentPane().add(btnNewButton);
105 |
106 | JButton btnSubstraction = new JButton("Subtraction");
107 | btnSubstraction.addActionListener(new ActionListener() {
108 | public void actionPerformed(ActionEvent e) {
109 |
110 | int n = 0;
111 | int n2 = 0;
112 |
113 | try {
114 |
115 | n = Integer.parseInt(textField.getText());
116 | n2 = Integer.parseInt(textField_1.getText());
117 | String result = (n-n2)+"";
118 |
119 | txtAnswer.setText(result);
120 |
121 | textField.setText(null);
122 | textField_1.setText(null);
123 |
124 | } catch (Exception e2) {
125 |
126 | JOptionPane.showMessageDialog(null, "Enter Valid Number");
127 | textField.setText(null);
128 | textField_1.setText(null);
129 | txtAnswer.setText("Answer");
130 | }
131 |
132 |
133 | }
134 | });
135 | btnSubstraction.setFont(new Font("Arial", Font.BOLD, 20));
136 | btnSubstraction.setBackground(new Color(0, 128, 255));
137 | btnSubstraction.setBounds(54, 383, 164, 40);
138 | frame.getContentPane().add(btnSubstraction);
139 |
140 | JButton btnMultiplication = new JButton("Multiplication");
141 | btnMultiplication.addActionListener(new ActionListener() {
142 | public void actionPerformed(ActionEvent e) {
143 |
144 | int n = 0;
145 | int n2 = 0;
146 |
147 | try {
148 |
149 | n = Integer.parseInt(textField.getText());
150 | n2 = Integer.parseInt(textField_1.getText());
151 | String result = (n*n2)+"";
152 |
153 | txtAnswer.setText(result);
154 |
155 | textField.setText(null);
156 | textField_1.setText(null);
157 |
158 | } catch (Exception e2) {
159 |
160 | JOptionPane.showMessageDialog(null, "Enter Valid Number");
161 | textField.setText(null);
162 | textField_1.setText(null);
163 | txtAnswer.setText("Answer");
164 | }
165 |
166 |
167 | }
168 | });
169 | btnMultiplication.setFont(new Font("Arial", Font.BOLD, 20));
170 | btnMultiplication.setBackground(new Color(0, 128, 255));
171 | btnMultiplication.setBounds(54, 467, 164, 40);
172 | frame.getContentPane().add(btnMultiplication);
173 |
174 | JButton btnDivsion = new JButton("Division");
175 | btnDivsion.addActionListener(new ActionListener() {
176 | public void actionPerformed(ActionEvent e) {
177 |
178 | int n = 0;
179 | int n2 = 0;
180 |
181 | try {
182 |
183 | n = Integer.parseInt(textField.getText());
184 | n2 = Integer.parseInt(textField_1.getText());
185 | String result = (n+n2)+"";
186 |
187 | txtAnswer.setText(result);
188 |
189 | textField.setText(null);
190 | textField_1.setText(null);
191 |
192 | if(n2==0) {
193 | txtAnswer.setText("Not Valid");
194 | JOptionPane.showMessageDialog(null, "Number 2 not be 0");
195 | txtAnswer.setText("Anwser");
196 | }else {
197 |
198 | txtAnswer.setText((n/n2)+"");
199 |
200 | }
201 |
202 | } catch (Exception e2) {
203 |
204 | JOptionPane.showMessageDialog(null, "Enter Valid Number");
205 | textField.setText(null);
206 | textField_1.setText(null);
207 | txtAnswer.setText("Answer");
208 | }
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 | }
218 | });
219 | btnDivsion.setFont(new Font("Arial", Font.BOLD, 20));
220 | btnDivsion.setBackground(new Color(0, 128, 255));
221 | btnDivsion.setBounds(54, 552, 164, 40);
222 | frame.getContentPane().add(btnDivsion);
223 |
224 | txtAnswer = new JTextField();
225 | txtAnswer.setFont(new Font("Tahoma", Font.BOLD, 18));
226 | txtAnswer.setText("Answer");
227 | txtAnswer.setHorizontalAlignment(SwingConstants.CENTER);
228 | txtAnswer.setBounds(536, 407, 319, 54);
229 | frame.getContentPane().add(txtAnswer);
230 | txtAnswer.setColumns(10);
231 |
232 | JLabel lblNewLabel = new JLabel("First Number : ");
233 | lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
234 | lblNewLabel.setBounds(11, 176, 155, 36);
235 | frame.getContentPane().add(lblNewLabel);
236 |
237 | JLabel lblSecondNumber = new JLabel("Second Number : ");
238 | lblSecondNumber.setFont(new Font("Tahoma", Font.BOLD, 20));
239 | lblSecondNumber.setBounds(536, 174, 197, 40);
240 | frame.getContentPane().add(lblSecondNumber);
241 |
242 | JLabel lblNewLabel_1 = new JLabel("Calculator");
243 | lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
244 | lblNewLabel_1.setFont(new Font("Yu Gothic UI Semibold", Font.BOLD, 40));
245 | lblNewLabel_1.setBounds(258, 34, 397, 99);
246 | frame.getContentPane().add(lblNewLabel_1);
247 | frame.setBounds(100, 100, 945, 693);
248 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
249 | }
250 | }
251 |
--------------------------------------------------------------------------------
/ComboBox/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ComboBox/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ComboBox
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ComboBox/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/ComboBox/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/ComboBox/bin/com/masai/main/ComboBox$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/ComboBox/bin/com/masai/main/ComboBox$1.class
--------------------------------------------------------------------------------
/ComboBox/bin/com/masai/main/ComboBox.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/ComboBox/bin/com/masai/main/ComboBox.class
--------------------------------------------------------------------------------
/ComboBox/src/com/masai/main/ComboBox.java:
--------------------------------------------------------------------------------
1 | package com.masai.main;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.JFrame;
6 | import javax.swing.JLabel;
7 | import java.awt.Font;
8 | import javax.swing.SwingConstants;
9 | import javax.swing.JComboBox;
10 |
11 | public class ComboBox {
12 |
13 | private JFrame frame;
14 |
15 | /**
16 | * Launch the application.
17 | */
18 | public static void main(String[] args) {
19 | EventQueue.invokeLater(new Runnable() {
20 | public void run() {
21 | try {
22 | ComboBox window = new ComboBox();
23 | window.frame.setVisible(true);
24 | } catch (Exception e) {
25 | e.printStackTrace();
26 | }
27 | }
28 | });
29 | }
30 |
31 | /**
32 | * Create the application.
33 | */
34 | public ComboBox() {
35 | initialize();
36 | }
37 |
38 | /**
39 | * Initialize the contents of the frame.
40 | */
41 | private void initialize() {
42 | frame = new JFrame();
43 | frame.setBounds(100, 100, 747, 522);
44 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
45 | frame.getContentPane().setLayout(null);
46 |
47 | JLabel lblNewLabel = new JLabel("Combo Box Example");
48 | lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
49 | lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 30));
50 | lblNewLabel.setBounds(137, 27, 486, 81);
51 | frame.getContentPane().add(lblNewLabel);
52 |
53 | JComboBox comboBox = new JComboBox();
54 | comboBox.setToolTipText("");
55 | comboBox.setFont(new Font("Tahoma", Font.PLAIN, 20));
56 | comboBox.addItem("Maths");
57 | comboBox.addItem("Commerce");
58 | comboBox.addItem("Arts");
59 | comboBox.addItem("Bio");
60 |
61 |
62 | comboBox.setBounds(287, 155, 165, 45);
63 | frame.getContentPane().add(comboBox);
64 |
65 | JLabel lblNewLabel_1 = new JLabel("Select Subject : ");
66 | lblNewLabel_1.setFont(new Font("Arial Black", Font.PLAIN, 25));
67 | lblNewLabel_1.setBounds(58, 153, 231, 45);
68 | frame.getContentPane().add(lblNewLabel_1);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Image_As_Label/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Image_As_Label/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Image_As_Label
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Image_As_Label/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/Image_As_Label/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/Image_As_Label/bin/com/masai/Main/ImageLabel$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/bin/com/masai/Main/ImageLabel$1.class
--------------------------------------------------------------------------------
/Image_As_Label/bin/com/masai/Main/ImageLabel$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/bin/com/masai/Main/ImageLabel$2.class
--------------------------------------------------------------------------------
/Image_As_Label/bin/com/masai/Main/ImageLabel.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/bin/com/masai/Main/ImageLabel.class
--------------------------------------------------------------------------------
/Image_As_Label/bin/images/password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/bin/images/password.png
--------------------------------------------------------------------------------
/Image_As_Label/bin/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/bin/images/user.png
--------------------------------------------------------------------------------
/Image_As_Label/bin/images/user2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/bin/images/user2.png
--------------------------------------------------------------------------------
/Image_As_Label/src/com/masai/Main/ImageLabel.java:
--------------------------------------------------------------------------------
1 | package com.masai.Main;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.ImageIcon;
6 | import javax.swing.JFrame;
7 | import javax.swing.JLabel;
8 | import javax.swing.JOptionPane;
9 |
10 | import java.awt.Font;
11 | import java.awt.Image;
12 | import javax.swing.SwingConstants;
13 | import java.awt.SystemColor;
14 | import javax.swing.JTextField;
15 | import javax.swing.JButton;
16 | import java.awt.event.ActionListener;
17 | import java.awt.event.ActionEvent;
18 |
19 | public class ImageLabel {
20 |
21 | private JFrame frame;
22 | private JTextField textField;
23 | private JTextField textField_1;
24 | private JLabel lblNewLabel_1;
25 |
26 | /**
27 | * Launch the application.
28 | */
29 | public static void main(String[] args) {
30 | EventQueue.invokeLater(new Runnable() {
31 | public void run() {
32 | try {
33 | ImageLabel window = new ImageLabel();
34 | window.frame.setVisible(true);
35 | } catch (Exception e) {
36 | e.printStackTrace();
37 | }
38 | }
39 | });
40 | }
41 |
42 | /**
43 | * Create the application.
44 | */
45 | public ImageLabel() {
46 | initialize();
47 | }
48 |
49 | /**
50 | * Initialize the contents of the frame.
51 | */
52 | private void initialize() {
53 | frame = new JFrame();
54 | frame.getContentPane().setBackground(SystemColor.inactiveCaption);
55 | frame.setBounds(100, 100, 943, 589);
56 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
57 | frame.getContentPane().setLayout(null);
58 |
59 | JLabel lblNewLabel = new JLabel("User Login");
60 | lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
61 | lblNewLabel.setFont(new Font("Arial", Font.BOLD, 35));
62 | lblNewLabel.setBounds(351, 42, 358, 141);
63 | frame.getContentPane().add(lblNewLabel);
64 | ImageIcon img1 = new ImageIcon(getClass().getResource("/images/user2.png"));
65 | Image i1 = img1.getImage();
66 | Image new_image1 = i1.getScaledInstance(80, 80, Image.SCALE_SMOOTH);
67 | img1 = new ImageIcon(new_image1);
68 | lblNewLabel.setIcon(img1);
69 |
70 |
71 | lblNewLabel_1 = new JLabel("Username :");
72 | lblNewLabel_1.setFont(new Font("Arial", Font.BOLD, 25));
73 | lblNewLabel_1.setBounds(47, 193, 223, 53);
74 | frame.getContentPane().add(lblNewLabel_1);
75 | img1 = new ImageIcon(getClass().getResource("/images/user.png"));
76 | i1 = img1.getImage();
77 | new_image1 = i1.getScaledInstance(50, 50, Image.SCALE_SMOOTH);
78 | img1 = new ImageIcon(new_image1);
79 | lblNewLabel_1.setIcon(img1);
80 |
81 |
82 | JLabel lblNewLabel_2 = new JLabel("Password :");
83 | ImageIcon img = new ImageIcon(getClass().getResource("/images/password.png"));
84 | Image i = img.getImage();
85 | Image new_image = i.getScaledInstance(50, 50, Image.SCALE_SMOOTH);
86 | img = new ImageIcon(new_image);
87 |
88 | lblNewLabel_2.setIcon(img);
89 | lblNewLabel_2.setFont(new Font("Arial", Font.BOLD, 25));
90 | lblNewLabel_2.setBounds(47, 310, 223, 51);
91 | frame.getContentPane().add(lblNewLabel_2);
92 |
93 | textField = new JTextField();
94 | textField.setFont(new Font("Tahoma", Font.PLAIN, 20));
95 | textField.setBounds(302, 193, 452, 54);
96 | frame.getContentPane().add(textField);
97 | textField.setColumns(10);
98 |
99 | textField_1 = new JTextField();
100 | textField_1.setFont(new Font("Tahoma", Font.PLAIN, 20));
101 | textField_1.setBounds(302, 309, 452, 54);
102 | frame.getContentPane().add(textField_1);
103 | textField_1.setColumns(10);
104 |
105 | JButton btnNewButton = new JButton("Login");
106 | btnNewButton.addActionListener(new ActionListener() {
107 | public void actionPerformed(ActionEvent e) {
108 |
109 | JOptionPane.showMessageDialog(null,"Your User name is : "+ textField.getText()+"\n Password is : "+textField_1.getText());
110 |
111 | }
112 | });
113 | btnNewButton.setFont(new Font("Inter Black", Font.BOLD, 35));
114 | btnNewButton.setBounds(386, 444, 210, 60);
115 | frame.getContentPane().add(btnNewButton);
116 |
117 |
118 |
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/Image_As_Label/src/images/password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/src/images/password.png
--------------------------------------------------------------------------------
/Image_As_Label/src/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/src/images/user.png
--------------------------------------------------------------------------------
/Image_As_Label/src/images/user2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Image_As_Label/src/images/user2.png
--------------------------------------------------------------------------------
/List_IMPORTANT/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/List_IMPORTANT/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | List_IMPORTANT
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/List_IMPORTANT/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/List_IMPORTANT/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/List_IMPORTANT/bin/com/masai/list/list$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/List_IMPORTANT/bin/com/masai/list/list$1.class
--------------------------------------------------------------------------------
/List_IMPORTANT/bin/com/masai/list/list$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/List_IMPORTANT/bin/com/masai/list/list$2.class
--------------------------------------------------------------------------------
/List_IMPORTANT/bin/com/masai/list/list.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/List_IMPORTANT/bin/com/masai/list/list.class
--------------------------------------------------------------------------------
/List_IMPORTANT/src/com/masai/list/list.java:
--------------------------------------------------------------------------------
1 | package com.masai.list;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.JFrame;
6 | import java.awt.SystemColor;
7 | import javax.swing.JTextField;
8 | import javax.swing.JLabel;
9 | import java.awt.Font;
10 |
11 | import javax.swing.DefaultListModel;
12 | import javax.swing.JButton;
13 | import javax.swing.JList;
14 | import java.awt.event.ActionListener;
15 | import java.awt.event.ActionEvent;
16 | import javax.swing.border.BevelBorder;
17 | import javax.swing.border.LineBorder;
18 | import java.awt.Color;
19 |
20 | public class list {
21 |
22 | private JFrame frame;
23 | private JTextField textField;
24 |
25 | /**
26 | * Launch the application.
27 | */
28 | public static void main(String[] args) {
29 | EventQueue.invokeLater(new Runnable() {
30 | public void run() {
31 | try {
32 | list window = new list();
33 | window.frame.setVisible(true);
34 | } catch (Exception e) {
35 | e.printStackTrace();
36 | }
37 | }
38 | });
39 | }
40 |
41 | /**
42 | * Create the application.
43 | */
44 | public list() {
45 | initialize();
46 | }
47 |
48 | DefaultListModel m = new DefaultListModel();
49 | private JList list;
50 |
51 | public void add(String value) {
52 |
53 | list.setModel(m);
54 |
55 | m.addElement(value);
56 |
57 |
58 | }
59 |
60 |
61 |
62 | /**
63 | * Initialize the contents of the frame.
64 | */
65 | private void initialize() {
66 | frame = new JFrame();
67 | frame.getContentPane().setBackground(SystemColor.activeCaption);
68 | frame.setBounds(100, 100, 826, 530);
69 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
70 | frame.getContentPane().setLayout(null);
71 |
72 | textField = new JTextField();
73 | textField.setFont(new Font("Tahoma", Font.PLAIN, 25));
74 | textField.setBounds(219, 30, 274, 37);
75 | frame.getContentPane().add(textField);
76 | textField.setColumns(10);
77 |
78 | JLabel lblNewLabel = new JLabel("Roll Number : ");
79 | lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
80 | lblNewLabel.setBounds(60, 32, 181, 37);
81 | frame.getContentPane().add(lblNewLabel);
82 |
83 | JButton btnNewButton = new JButton("Submit");
84 | btnNewButton.addActionListener(new ActionListener() {
85 | public void actionPerformed(ActionEvent e) {
86 |
87 |
88 | add(textField.getText());
89 | textField.setText(null);
90 |
91 |
92 | }
93 | });
94 | btnNewButton.setFont(new Font("Open Sans Semibold", Font.BOLD, 20));
95 | btnNewButton.setBounds(545, 32, 122, 37);
96 | frame.getContentPane().add(btnNewButton);
97 |
98 | list = new JList();
99 | list.setVisibleRowCount(60);
100 | list.setFont(new Font("Cambria Math", Font.BOLD, 20));
101 | list.setBounds(79, 137, 274, 244);
102 | frame.getContentPane().add(list);
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/PageRedirecting/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/PageRedirecting/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | PageRedirecting
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/PageRedirecting/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/PageRedirecting/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/PageRedirecting/bin/com/masai/Main/LoginPage$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/PageRedirecting/bin/com/masai/Main/LoginPage$1.class
--------------------------------------------------------------------------------
/PageRedirecting/bin/com/masai/Main/LoginPage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/PageRedirecting/bin/com/masai/Main/LoginPage.class
--------------------------------------------------------------------------------
/PageRedirecting/src/com/masai/Main/LoginPage.java:
--------------------------------------------------------------------------------
1 | package com.masai.Main;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.JFrame;
6 | import javax.swing.JLabel;
7 | import java.awt.Font;
8 | import javax.swing.SwingConstants;
9 | import javax.swing.JTextField;
10 | import javax.swing.JPasswordField;
11 |
12 | public class LoginPage {
13 |
14 | private JFrame frame;
15 | private JTextField textField;
16 | private JPasswordField passwordField;
17 |
18 | /**
19 | * Launch the application.
20 | */
21 | public static void main(String[] args) {
22 | EventQueue.invokeLater(new Runnable() {
23 | public void run() {
24 | try {
25 | LoginPage window = new LoginPage();
26 | window.frame.setVisible(true);
27 | } catch (Exception e) {
28 | e.printStackTrace();
29 | }
30 | }
31 | });
32 | }
33 |
34 | /**
35 | * Create the application.
36 | */
37 | public LoginPage() {
38 | initialize();
39 | }
40 |
41 | /**
42 | * Initialize the contents of the frame.
43 | */
44 | private void initialize() {
45 | frame = new JFrame();
46 | frame.setBounds(100, 100, 1023, 673);
47 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
48 | frame.getContentPane().setLayout(null);
49 |
50 | JLabel lblNewLabel = new JLabel("Welcome");
51 | lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
52 | lblNewLabel.setFont(new Font("Trebuchet MS", Font.BOLD, 50));
53 | lblNewLabel.setBounds(428, 10, 227, 65);
54 | frame.getContentPane().add(lblNewLabel);
55 |
56 | JLabel lblNewLabel_1 = new JLabel("Username : ");
57 | lblNewLabel_1.setFont(new Font("Microsoft JhengHei UI", Font.BOLD, 25));
58 | lblNewLabel_1.setBounds(28, 185, 157, 47);
59 | frame.getContentPane().add(lblNewLabel_1);
60 |
61 | JLabel lblNewLabel_1_1 = new JLabel("Password : ");
62 | lblNewLabel_1_1.setFont(new Font("Microsoft JhengHei UI", Font.BOLD, 25));
63 | lblNewLabel_1_1.setBounds(28, 323, 157, 47);
64 | frame.getContentPane().add(lblNewLabel_1_1);
65 |
66 | textField = new JTextField();
67 | textField.setBounds(204, 185, 553, 46);
68 | frame.getContentPane().add(textField);
69 | textField.setColumns(10);
70 |
71 | passwordField = new JPasswordField();
72 | passwordField.setBounds(204, 323, 553, 47);
73 | frame.getContentPane().add(passwordField);
74 | }
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/PasswordField/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/PasswordField/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | PasswordField
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/PasswordField/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/PasswordField/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/PasswordField/bin/com/masai/Main/Password$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/PasswordField/bin/com/masai/Main/Password$1.class
--------------------------------------------------------------------------------
/PasswordField/bin/com/masai/Main/Password$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/PasswordField/bin/com/masai/Main/Password$2.class
--------------------------------------------------------------------------------
/PasswordField/bin/com/masai/Main/Password.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/PasswordField/bin/com/masai/Main/Password.class
--------------------------------------------------------------------------------
/PasswordField/src/com/masai/Main/Password.java:
--------------------------------------------------------------------------------
1 | package com.masai.Main;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.JFrame;
6 | import javax.swing.JLabel;
7 | import javax.swing.JOptionPane;
8 |
9 | import java.awt.Font;
10 | import javax.swing.SwingConstants;
11 | import javax.swing.JTextField;
12 | import javax.swing.JButton;
13 | import javax.swing.JPasswordField;
14 | import java.awt.event.ActionListener;
15 | import java.awt.event.ActionEvent;
16 |
17 | public class Password {
18 |
19 | private JFrame frame;
20 | private JTextField textField;
21 | private JPasswordField passwordField;
22 |
23 | /**
24 | * Launch the application.
25 | */
26 | public static void main(String[] args) {
27 | EventQueue.invokeLater(new Runnable() {
28 | public void run() {
29 | try {
30 | Password window = new Password();
31 | window.frame.setVisible(true);
32 | } catch (Exception e) {
33 | e.printStackTrace();
34 | }
35 | }
36 | });
37 | }
38 |
39 | /**
40 | * Create the application.
41 | */
42 | public Password() {
43 | initialize();
44 | }
45 |
46 | /**
47 | * Initialize the contents of the frame.
48 | */
49 | private void initialize() {
50 | frame = new JFrame();
51 | frame.setBounds(100, 100, 720, 524);
52 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
53 | frame.getContentPane().setLayout(null);
54 |
55 | JLabel lblNewLabel = new JLabel("Login Page");
56 | lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
57 | lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 30));
58 | lblNewLabel.setBounds(220, 35, 242, 76);
59 | frame.getContentPane().add(lblNewLabel);
60 |
61 | JLabel lblNewLabel_1 = new JLabel("Username :");
62 | lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 20));
63 | lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
64 | lblNewLabel_1.setBounds(59, 175, 144, 41);
65 | frame.getContentPane().add(lblNewLabel_1);
66 |
67 | JLabel lblNewLabel_2 = new JLabel("Password :");
68 | lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);
69 | lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 20));
70 | lblNewLabel_2.setBounds(59, 302, 144, 32);
71 | frame.getContentPane().add(lblNewLabel_2);
72 |
73 | textField = new JTextField();
74 | textField.setFont(new Font("Tahoma", Font.PLAIN, 20));
75 | textField.setBounds(220, 179, 419, 41);
76 | frame.getContentPane().add(textField);
77 | textField.setColumns(10);
78 |
79 | JButton btnNewButton = new JButton("Login");
80 | btnNewButton.addActionListener(new ActionListener() {
81 | public void actionPerformed(ActionEvent e) {
82 |
83 | JOptionPane.showMessageDialog(null, "User name : "+textField.getText()+"\n Password : "+passwordField.getText());
84 | }
85 | });
86 | btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 25));
87 | btnNewButton.setBounds(311, 393, 122, 41);
88 | frame.getContentPane().add(btnNewButton);
89 |
90 | passwordField = new JPasswordField();
91 | passwordField.setFont(new Font("Tahoma", Font.PLAIN, 20));
92 | passwordField.setBounds(220, 291, 419, 41);
93 | frame.getContentPane().add(passwordField);
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Swing Application
2 |
3 | This repository contains various projects developed using Swing, a graphical user interface (GUI) toolkit for Java. Each project focuses on different aspects of Swing components and functionality. Explore the projects below and have fun experimenting with Swing!
4 |
5 |
6 |
7 |
8 |
9 |
10 | ## Projects
11 |
12 |
13 | ### Calculator 🧮
14 | A basic calculator application built using Swing components. Perform arithmetic operations and calculations with ease. The calculator supports addition, subtraction, multiplication, and division. It provides a user-friendly interface with buttons for numbers, operators, and a clear function. The application ensures accurate calculations and displays results in real-time.
15 |
16 | ### ComboBox 🔄
17 | Learn about combo boxes and how to use them effectively in your Swing applications. Explore different options and make selections effortlessly. The project demonstrates the creation and customization of combo boxes. It covers topics such as adding items, selecting default values, handling events, and dynamically updating the combo box contents based on user interactions.
18 |
19 | ### Image_As_Label 🖼️
20 | Discover how to display images within Swing components. This project demonstrates how to load and showcase images using JLabel. It covers various image-related operations, such as resizing, positioning, and alignment within a JLabel. You will learn how to dynamically load images from external sources or local files and display them in your Swing application with ease.
21 |
22 | ### List_IMPORTANT 📜
23 | Explore the usage of lists in Swing applications. This project demonstrates how to create and manipulate lists to present important information. It covers adding, removing, and updating list items dynamically. Additionally, the project showcases list selection handling, allowing users to interact with the list and perform actions based on their selections.
24 |
25 | ### PageRedirecting 🌐
26 | Learn how to redirect users to different pages within your Swing application. This project demonstrates the implementation of page navigation. It includes multiple panels/pages and navigation buttons to switch between them. You will understand how to manage the visibility and layout of different panels to create a multi-page application with smooth transitions.
27 |
28 | ### PasswordField 🔒
29 | Discover how to create secure password fields in your Swing applications. This project demonstrates the usage of password fields to ensure data privacy. It covers topics such as input handling, password validation, and secure storage techniques. You will learn how to mask user input, perform password strength checks, and securely store passwords.
30 |
31 | ### RadioButton_And_CheckBox ✅
32 | Learn about radio buttons and checkboxes in Swing. This project showcases how to create and utilize these components for user selections. It covers the creation of radio button groups and handling selection events. Additionally, the project demonstrates the usage of checkboxes for multiple selections and their corresponding event handling.
33 |
34 | ### Sample_Project 🎉
35 | A sample project that showcases various Swing components and their usage. Experiment with different features and get inspired for your own projects! The project includes a collection of Swing components such as buttons, labels, text fields, sliders, and more. You can explore their properties, interactions, and customization options to create rich and interactive user interfaces.
36 |
37 | Feel free to clone or download any of these projects and explore the code. Happy coding! 😄
38 |
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | RadioButton_And_CheckBox
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$1.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$10.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$10.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$2.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$3.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$4.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$5.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$6.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$7.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$8.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example$9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example$9.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/bin/com/masai/Main/Example.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/RadioButton_And_CheckBox/bin/com/masai/Main/Example.class
--------------------------------------------------------------------------------
/RadioButton_And_CheckBox/src/com/masai/Main/Example.java:
--------------------------------------------------------------------------------
1 | package com.masai.Main;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.JFrame;
6 | import javax.swing.JLabel;
7 | import javax.swing.JOptionPane;
8 |
9 | import java.awt.Font;
10 | import javax.swing.SwingConstants;
11 | import javax.swing.JCheckBox;
12 | import javax.swing.JRadioButton;
13 | import java.awt.event.ActionListener;
14 | import java.awt.event.ActionEvent;
15 | import javax.swing.JButton;
16 |
17 | public class Example {
18 |
19 | private JFrame frame;
20 | private JCheckBox chckbxNewCheckBox;
21 | private JCheckBox chckbxNewCheckBox_1;
22 | private JCheckBox chckbxNewCheckBox_2;
23 | private JCheckBox chckbxNewCheckBox_3;
24 | private JRadioButton rdbtnNewRadioButton;
25 | private JRadioButton rdbtnNewRadioButton_1;
26 | private JRadioButton rdbtnNewRadioButton_2;
27 | private JRadioButton rdbtnNewRadioButton_3;
28 |
29 |
30 | /**
31 | * Launch the application.
32 | */
33 | public static void main(String[] args) {
34 | EventQueue.invokeLater(new Runnable() {
35 | public void run() {
36 | try {
37 | Example window = new Example();
38 | window.frame.setVisible(true);
39 | } catch (Exception e) {
40 | e.printStackTrace();
41 | }
42 | }
43 | });
44 | }
45 |
46 | /**
47 | * Create the application.
48 | */
49 | public Example() {
50 | initialize();
51 | }
52 |
53 | /**
54 | * Initialize the contents of the frame.
55 | */
56 | private void initialize() {
57 | frame = new JFrame();
58 | frame.setBounds(100, 100, 688, 583);
59 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
60 | frame.getContentPane().setLayout(null);
61 |
62 | JLabel lblNewLabel = new JLabel("Examples of Radio Buttons And Check Boxs");
63 | lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
64 | lblNewLabel.setFont(new Font("Open Sans Semibold", Font.BOLD, 25));
65 | lblNewLabel.setBounds(10, 10, 638, 72);
66 | frame.getContentPane().add(lblNewLabel);
67 |
68 | chckbxNewCheckBox = new JCheckBox("Checkbox 1");
69 | chckbxNewCheckBox.addActionListener(new ActionListener() {
70 | public void actionPerformed(ActionEvent e) {
71 |
72 | if(chckbxNewCheckBox.isSelected()) {
73 |
74 | chckbxNewCheckBox_1.setSelected(false);
75 | chckbxNewCheckBox_2.setSelected(false);
76 | chckbxNewCheckBox_3.setSelected(false);
77 |
78 |
79 |
80 | }
81 | }
82 | });
83 | chckbxNewCheckBox.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
84 | chckbxNewCheckBox.setBounds(58, 159, 179, 40);
85 | frame.getContentPane().add(chckbxNewCheckBox);
86 |
87 | chckbxNewCheckBox_1 = new JCheckBox("Checkbox 2");
88 | chckbxNewCheckBox_1.addActionListener(new ActionListener() {
89 | public void actionPerformed(ActionEvent e) {
90 |
91 | if(chckbxNewCheckBox_1.isSelected()) {
92 |
93 | chckbxNewCheckBox.setSelected(false);
94 | chckbxNewCheckBox_2.setSelected(false);
95 | chckbxNewCheckBox_3.setSelected(false);
96 |
97 |
98 |
99 | }
100 |
101 | }
102 | });
103 | chckbxNewCheckBox_1.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
104 | chckbxNewCheckBox_1.setBounds(58, 230, 126, 21);
105 | frame.getContentPane().add(chckbxNewCheckBox_1);
106 |
107 | chckbxNewCheckBox_2 = new JCheckBox("Checkbox 3");
108 | chckbxNewCheckBox_2.addActionListener(new ActionListener() {
109 | public void actionPerformed(ActionEvent e) {
110 |
111 | if(chckbxNewCheckBox_2.isSelected()) {
112 |
113 | chckbxNewCheckBox.setSelected(false);
114 | chckbxNewCheckBox_1.setSelected(false);
115 | chckbxNewCheckBox_3.setSelected(false);
116 |
117 |
118 |
119 | }
120 |
121 | }
122 | });
123 | chckbxNewCheckBox_2.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
124 | chckbxNewCheckBox_2.setBounds(58, 287, 126, 21);
125 | frame.getContentPane().add(chckbxNewCheckBox_2);
126 |
127 | chckbxNewCheckBox_3 = new JCheckBox("Checkbox 4");
128 | chckbxNewCheckBox_3.addActionListener(new ActionListener() {
129 | public void actionPerformed(ActionEvent e) {
130 |
131 | if(chckbxNewCheckBox_3.isSelected()) {
132 |
133 |
134 | chckbxNewCheckBox.setSelected(false);
135 | chckbxNewCheckBox_1.setSelected(false);
136 | chckbxNewCheckBox_2.setSelected(false);
137 |
138 |
139 |
140 | }
141 |
142 |
143 | }
144 | });
145 | chckbxNewCheckBox_3.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
146 | chckbxNewCheckBox_3.setBounds(58, 355, 126, 21);
147 | frame.getContentPane().add(chckbxNewCheckBox_3);
148 |
149 | rdbtnNewRadioButton = new JRadioButton("Radio buttonn 1");
150 | rdbtnNewRadioButton.addActionListener(new ActionListener() {
151 | public void actionPerformed(ActionEvent e) {
152 |
153 | if(rdbtnNewRadioButton.isSelected()) {
154 |
155 | rdbtnNewRadioButton_1.setSelected(false);
156 | rdbtnNewRadioButton_2.setSelected(false);
157 | rdbtnNewRadioButton_3.setSelected(false);
158 |
159 | }
160 |
161 | }
162 | });
163 | rdbtnNewRadioButton.setFont(new Font("Arial Black", Font.ITALIC, 16));
164 | rdbtnNewRadioButton.setBounds(427, 168, 165, 21);
165 | frame.getContentPane().add(rdbtnNewRadioButton);
166 |
167 | rdbtnNewRadioButton_1 = new JRadioButton("Radio button 2");
168 | rdbtnNewRadioButton_1.addActionListener(new ActionListener() {
169 | public void actionPerformed(ActionEvent e) {
170 |
171 | if(rdbtnNewRadioButton_1.isSelected()) {
172 |
173 | rdbtnNewRadioButton.setSelected(false);
174 | rdbtnNewRadioButton_2.setSelected(false);
175 | rdbtnNewRadioButton_3.setSelected(false);
176 |
177 | }
178 |
179 | }
180 | });
181 | rdbtnNewRadioButton_1.setFont(new Font("Arial Black", Font.BOLD | Font.ITALIC, 16));
182 | rdbtnNewRadioButton_1.setBounds(427, 229, 165, 22);
183 | frame.getContentPane().add(rdbtnNewRadioButton_1);
184 |
185 | rdbtnNewRadioButton_2 = new JRadioButton("Radio button 3");
186 | rdbtnNewRadioButton_2.addActionListener(new ActionListener() {
187 | public void actionPerformed(ActionEvent e) {
188 |
189 | if(rdbtnNewRadioButton_2.isSelected()) {
190 |
191 |
192 | rdbtnNewRadioButton.setSelected(false);
193 | rdbtnNewRadioButton_1.setSelected(false);
194 | rdbtnNewRadioButton_3.setSelected(false);
195 |
196 | }
197 |
198 | }
199 | });
200 | rdbtnNewRadioButton_2.setFont(new Font("Arial Black", Font.ITALIC, 16));
201 | rdbtnNewRadioButton_2.setBounds(427, 289, 165, 21);
202 | frame.getContentPane().add(rdbtnNewRadioButton_2);
203 |
204 | rdbtnNewRadioButton_3 = new JRadioButton("Radio button 4");
205 | rdbtnNewRadioButton_3.addActionListener(new ActionListener() {
206 | public void actionPerformed(ActionEvent e) {
207 |
208 | if(rdbtnNewRadioButton_3.isSelected()) {
209 |
210 | rdbtnNewRadioButton.setSelected(false);
211 | rdbtnNewRadioButton_1.setSelected(false);
212 | rdbtnNewRadioButton_2.setSelected(false);
213 |
214 | }
215 | }
216 | });
217 | rdbtnNewRadioButton_3.setFont(new Font("Arial Black", Font.ITALIC, 16));
218 | rdbtnNewRadioButton_3.setBounds(427, 357, 165, 21);
219 | frame.getContentPane().add(rdbtnNewRadioButton_3);
220 |
221 | JButton btnNewButton = new JButton("Submit");
222 | btnNewButton.addActionListener(new ActionListener() {
223 | public void actionPerformed(ActionEvent e) {
224 |
225 | if(chckbxNewCheckBox.isSelected()) {
226 | JOptionPane.showMessageDialog(null, "You have Selected Option 1");
227 | }
228 | if(chckbxNewCheckBox_1.isSelected()) {
229 | JOptionPane.showMessageDialog(null, "You have Selected Option 2");
230 | }
231 | if(chckbxNewCheckBox_2.isSelected()) {
232 | JOptionPane.showMessageDialog(null, "You have Selected Option 3");
233 | }
234 | if(chckbxNewCheckBox_3.isSelected()) {
235 | JOptionPane.showMessageDialog(null, "You have Selected Option 4");
236 | }
237 |
238 |
239 | }
240 | });
241 | btnNewButton.setFont(new Font("Arial", Font.BOLD, 18));
242 | btnNewButton.setBounds(247, 447, 147, 40);
243 | frame.getContentPane().add(btnNewButton);
244 | }
245 | }
246 |
--------------------------------------------------------------------------------
/Sample_Project/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Sample_Project/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Sample_Project
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Sample_Project/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/Sample_Project/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/Sample_Project/bin/com/masai/components/component1$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Sample_Project/bin/com/masai/components/component1$1.class
--------------------------------------------------------------------------------
/Sample_Project/bin/com/masai/components/component1$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Sample_Project/bin/com/masai/components/component1$2.class
--------------------------------------------------------------------------------
/Sample_Project/bin/com/masai/components/component1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/Sample_Project/bin/com/masai/components/component1.class
--------------------------------------------------------------------------------
/Sample_Project/src/com/masai/components/component1.java:
--------------------------------------------------------------------------------
1 | package com.masai.components;
2 |
3 | import java.awt.EventQueue;
4 |
5 | import javax.swing.JFrame;
6 | import javax.swing.JLabel;
7 | import javax.swing.JOptionPane;
8 |
9 | import java.awt.BorderLayout;
10 | import java.awt.Font;
11 | import java.awt.Color;
12 | import javax.swing.SwingConstants;
13 | import javax.swing.JTextField;
14 | import javax.swing.JButton;
15 | import java.awt.event.ActionListener;
16 | import java.awt.event.ActionEvent;
17 |
18 | public class component1 {
19 |
20 | private JFrame frame;
21 | private JTextField textField;
22 | private JTextField textField_1;
23 |
24 | /**
25 | * Launch the application.
26 | */
27 | public static void main(String[] args) {
28 | EventQueue.invokeLater(new Runnable() {
29 | public void run() {
30 | try {
31 | component1 window = new component1();
32 | window.frame.setVisible(true);
33 | } catch (Exception e) {
34 | e.printStackTrace();
35 | }
36 | }
37 | });
38 | }
39 |
40 | /**
41 | * Create the application.
42 | */
43 | public component1() {
44 | initialize();
45 | }
46 |
47 | /**
48 | * Initialize the contents of the frame.
49 | */
50 | private void initialize() {
51 | frame = new JFrame();
52 | frame.getContentPane().setBackground(Color.BLUE);
53 | frame.setBounds(100, 100, 1073, 719);
54 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
55 | frame.getContentPane().setLayout(null);
56 |
57 | JLabel lblNewLabel = new JLabel("Login Form");
58 | lblNewLabel.setBackground(new Color(255, 0, 255));
59 | lblNewLabel.setForeground(new Color(255, 255, 255));
60 | lblNewLabel.setFont(new Font("Serif", Font.BOLD, 20));
61 | lblNewLabel.setBounds(277, 26, 103, 35);
62 | frame.getContentPane().add(lblNewLabel);
63 |
64 | JLabel lblNewLabel_1 = new JLabel("Username :");
65 | lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 25));
66 | lblNewLabel_1.setForeground(new Color(255, 255, 255));
67 | lblNewLabel_1.setBounds(95, 169, 143, 60);
68 | frame.getContentPane().add(lblNewLabel_1);
69 |
70 | JLabel lblNewLabel_1_1 = new JLabel("Password :");
71 | lblNewLabel_1_1.setForeground(Color.WHITE);
72 | lblNewLabel_1_1.setFont(new Font("Tahoma", Font.BOLD, 25));
73 | lblNewLabel_1_1.setBounds(95, 317, 143, 60);
74 | frame.getContentPane().add(lblNewLabel_1_1);
75 |
76 | textField = new JTextField();
77 | textField.setFont(new Font("Tahoma", Font.BOLD, 26));
78 | textField.setBounds(331, 185, 480, 44);
79 | frame.getContentPane().add(textField);
80 | textField.setColumns(10);
81 |
82 | textField_1 = new JTextField();
83 | textField_1.setFont(new Font("Tahoma", Font.BOLD, 28));
84 | textField_1.setColumns(10);
85 | textField_1.setBounds(331, 324, 480, 44);
86 | frame.getContentPane().add(textField_1);
87 |
88 | JButton btnNewButton = new JButton("Login");
89 | btnNewButton.addActionListener(new ActionListener() {
90 | public void actionPerformed(ActionEvent e) {
91 |
92 | JOptionPane.showMessageDialog(null,"Username : "+textField.getText()+"\n"+
93 |
94 | "Password : "+textField_1.getText());
95 |
96 |
97 | }
98 | });
99 | btnNewButton.setBackground(Color.WHITE);
100 | btnNewButton.setForeground(Color.BLACK);
101 | btnNewButton.setFont(new Font("Dialog", Font.BOLD, 23));
102 | btnNewButton.setBounds(376, 465, 164, 49);
103 | frame.getContentPane().add(btnNewButton);
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/javswing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shubh2-0/Swing_Application/3bc5522a992c445241f72e827d3b5076292872ba/javswing.png
--------------------------------------------------------------------------------