Skip to content

Commit 71a9ad8

Browse files
committed
codered
1 parent 115017d commit 71a9ad8

File tree

1 file changed

+138
-0
lines changed

1 file changed

+138
-0
lines changed

CODERED/codered4.java

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
package practice_java;
2+
public class codered4 extends javax.swing.JFrame {
3+
4+
public codered4() {
5+
initComponents();
6+
}
7+
private void initComponents() {
8+
9+
jLabel1 = new javax.swing.JLabel();
10+
problem1 = new javax.swing.JLabel();
11+
link1 = new javax.swing.JButton();
12+
remedies1 = new javax.swing.JButton();
13+
problem2 = new javax.swing.JLabel();
14+
link2 = new javax.swing.JButton();
15+
remedies2 = new javax.swing.JButton();
16+
jButton1 = new javax.swing.JButton();
17+
18+
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
19+
setTitle("CODERED");
20+
21+
jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 18));
22+
jLabel1.setText("Following can be the problem you may be suffering from");
23+
24+
problem1.setFont(new java.awt.Font("Segoe UI", 0, 14));
25+
problem1.setText("problem 1");
26+
27+
link1.setFont(new java.awt.Font("Segoe UI", 0, 14));
28+
link1.setText("link");
29+
30+
remedies1.setFont(new java.awt.Font("Segoe UI", 0, 14));
31+
remedies1.setText("remedies");
32+
33+
problem2.setFont(new java.awt.Font("Segoe UI", 0, 14));
34+
problem2.setText("problem 2");
35+
36+
link2.setFont(new java.awt.Font("Segoe UI", 0, 14));
37+
link2.setText("link");
38+
39+
remedies2.setFont(new java.awt.Font("Segoe UI", 0, 14));
40+
remedies2.setText("remedies");
41+
42+
jButton1.setFont(new java.awt.Font("Segoe UI", 0, 14));
43+
jButton1.setText("continue..");
44+
jButton1.addActionListener(new java.awt.event.ActionListener() {
45+
public void actionPerformed(java.awt.event.ActionEvent evt) {
46+
jButton1ActionPerformed(evt);
47+
}
48+
});
49+
50+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
51+
getContentPane().setLayout(layout);
52+
layout.setHorizontalGroup(
53+
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
54+
.addGroup(layout.createSequentialGroup()
55+
.addGap(23, 23, 23)
56+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
57+
.addComponent(jButton1)
58+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
59+
.addComponent(problem2)
60+
.addComponent(problem1)
61+
.addComponent(jLabel1)
62+
.addGroup(layout.createSequentialGroup()
63+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
64+
.addComponent(link1)
65+
.addComponent(link2))
66+
.addGap(48, 48, 48)
67+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
68+
.addComponent(remedies2)
69+
.addComponent(remedies1)))))
70+
.addContainerGap(37, Short.MAX_VALUE))
71+
);
72+
layout.setVerticalGroup(
73+
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
74+
.addGroup(layout.createSequentialGroup()
75+
.addGap(30, 30, 30)
76+
.addComponent(jLabel1)
77+
.addGap(18, 18, 18)
78+
.addComponent(problem1)
79+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
80+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
81+
.addComponent(link1)
82+
.addComponent(remedies1))
83+
.addGap(27, 27, 27)
84+
.addComponent(problem2)
85+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
86+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
87+
.addComponent(link2)
88+
.addComponent(remedies2))
89+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
90+
.addComponent(jButton1)
91+
.addGap(24, 24, 24))
92+
);
93+
94+
pack();
95+
}
96+
97+
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
98+
codered5 objs1 =new codered5();
99+
objs1.setVisible(true);
100+
}
101+
102+
103+
public static void main(String args[]) {
104+
105+
try {
106+
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
107+
if ("Nimbus".equals(info.getName())) {
108+
javax.swing.UIManager.setLookAndFeel(info.getClassName());
109+
break;
110+
}
111+
}
112+
} catch (ClassNotFoundException ex) {
113+
java.util.logging.Logger.getLogger(codered4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
114+
} catch (InstantiationException ex) {
115+
java.util.logging.Logger.getLogger(codered4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
116+
} catch (IllegalAccessException ex) {
117+
java.util.logging.Logger.getLogger(codered4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
118+
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
119+
java.util.logging.Logger.getLogger(codered4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
120+
}
121+
java.awt.EventQueue.invokeLater(new Runnable() {
122+
public void run() {
123+
new codered4().setVisible(true);
124+
}
125+
});
126+
}
127+
128+
// Variables declaration - do not modify
129+
private javax.swing.JButton jButton1;
130+
private javax.swing.JLabel jLabel1;
131+
private javax.swing.JButton link1;
132+
private javax.swing.JButton link2;
133+
private javax.swing.JLabel problem1;
134+
private javax.swing.JLabel problem2;
135+
private javax.swing.JButton remedies1;
136+
private javax.swing.JButton remedies2;
137+
// End of variables declaration
138+
}

0 commit comments

Comments
 (0)