-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
855 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.metadata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>ComboBox</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=17 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=17 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.masai.main; | ||
|
||
import java.awt.EventQueue; | ||
|
||
import javax.swing.JFrame; | ||
import javax.swing.JLabel; | ||
import java.awt.Font; | ||
import javax.swing.SwingConstants; | ||
import javax.swing.JComboBox; | ||
|
||
public class ComboBox { | ||
|
||
private JFrame frame; | ||
|
||
/** | ||
* Launch the application. | ||
*/ | ||
public static void main(String[] args) { | ||
EventQueue.invokeLater(new Runnable() { | ||
public void run() { | ||
try { | ||
ComboBox window = new ComboBox(); | ||
window.frame.setVisible(true); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Create the application. | ||
*/ | ||
public ComboBox() { | ||
initialize(); | ||
} | ||
|
||
/** | ||
* Initialize the contents of the frame. | ||
*/ | ||
private void initialize() { | ||
frame = new JFrame(); | ||
frame.setBounds(100, 100, 747, 522); | ||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
frame.getContentPane().setLayout(null); | ||
|
||
JLabel lblNewLabel = new JLabel("Combo Box Example"); | ||
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER); | ||
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 30)); | ||
lblNewLabel.setBounds(137, 27, 486, 81); | ||
frame.getContentPane().add(lblNewLabel); | ||
|
||
JComboBox comboBox = new JComboBox(); | ||
comboBox.setToolTipText(""); | ||
comboBox.setFont(new Font("Tahoma", Font.PLAIN, 20)); | ||
comboBox.addItem("Maths"); | ||
comboBox.addItem("Commerce"); | ||
comboBox.addItem("Arts"); | ||
comboBox.addItem("Bio"); | ||
|
||
|
||
comboBox.setBounds(287, 155, 165, 45); | ||
frame.getContentPane().add(comboBox); | ||
|
||
JLabel lblNewLabel_1 = new JLabel("Select Subject : "); | ||
lblNewLabel_1.setFont(new Font("Arial Black", Font.PLAIN, 25)); | ||
lblNewLabel_1.setBounds(58, 153, 231, 45); | ||
frame.getContentPane().add(lblNewLabel_1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Image_As_Label</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=17 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=17 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
package com.masai.Main; | ||
|
||
import java.awt.EventQueue; | ||
|
||
import javax.swing.ImageIcon; | ||
import javax.swing.JFrame; | ||
import javax.swing.JLabel; | ||
import javax.swing.JOptionPane; | ||
|
||
import java.awt.Font; | ||
import java.awt.Image; | ||
import javax.swing.SwingConstants; | ||
import java.awt.SystemColor; | ||
import javax.swing.JTextField; | ||
import javax.swing.JButton; | ||
import java.awt.event.ActionListener; | ||
import java.awt.event.ActionEvent; | ||
|
||
public class ImageLabel { | ||
|
||
private JFrame frame; | ||
private JTextField textField; | ||
private JTextField textField_1; | ||
private JLabel lblNewLabel_1; | ||
|
||
/** | ||
* Launch the application. | ||
*/ | ||
public static void main(String[] args) { | ||
EventQueue.invokeLater(new Runnable() { | ||
public void run() { | ||
try { | ||
ImageLabel window = new ImageLabel(); | ||
window.frame.setVisible(true); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Create the application. | ||
*/ | ||
public ImageLabel() { | ||
initialize(); | ||
} | ||
|
||
/** | ||
* Initialize the contents of the frame. | ||
*/ | ||
private void initialize() { | ||
frame = new JFrame(); | ||
frame.getContentPane().setBackground(SystemColor.inactiveCaption); | ||
frame.setBounds(100, 100, 943, 589); | ||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
frame.getContentPane().setLayout(null); | ||
|
||
JLabel lblNewLabel = new JLabel("User Login"); | ||
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER); | ||
lblNewLabel.setFont(new Font("Arial", Font.BOLD, 35)); | ||
lblNewLabel.setBounds(351, 42, 358, 141); | ||
frame.getContentPane().add(lblNewLabel); | ||
ImageIcon img1 = new ImageIcon(getClass().getResource("/images/user2.png")); | ||
Image i1 = img1.getImage(); | ||
Image new_image1 = i1.getScaledInstance(80, 80, Image.SCALE_SMOOTH); | ||
img1 = new ImageIcon(new_image1); | ||
lblNewLabel.setIcon(img1); | ||
|
||
|
||
lblNewLabel_1 = new JLabel("Username :"); | ||
lblNewLabel_1.setFont(new Font("Arial", Font.BOLD, 25)); | ||
lblNewLabel_1.setBounds(47, 193, 223, 53); | ||
frame.getContentPane().add(lblNewLabel_1); | ||
img1 = new ImageIcon(getClass().getResource("/images/user.png")); | ||
i1 = img1.getImage(); | ||
new_image1 = i1.getScaledInstance(50, 50, Image.SCALE_SMOOTH); | ||
img1 = new ImageIcon(new_image1); | ||
lblNewLabel_1.setIcon(img1); | ||
|
||
|
||
JLabel lblNewLabel_2 = new JLabel("Password :"); | ||
ImageIcon img = new ImageIcon(getClass().getResource("/images/password.png")); | ||
Image i = img.getImage(); | ||
Image new_image = i.getScaledInstance(50, 50, Image.SCALE_SMOOTH); | ||
img = new ImageIcon(new_image); | ||
|
||
lblNewLabel_2.setIcon(img); | ||
lblNewLabel_2.setFont(new Font("Arial", Font.BOLD, 25)); | ||
lblNewLabel_2.setBounds(47, 310, 223, 51); | ||
frame.getContentPane().add(lblNewLabel_2); | ||
|
||
textField = new JTextField(); | ||
textField.setFont(new Font("Tahoma", Font.PLAIN, 20)); | ||
textField.setBounds(302, 193, 452, 54); | ||
frame.getContentPane().add(textField); | ||
textField.setColumns(10); | ||
|
||
textField_1 = new JTextField(); | ||
textField_1.setFont(new Font("Tahoma", Font.PLAIN, 20)); | ||
textField_1.setBounds(302, 309, 452, 54); | ||
frame.getContentPane().add(textField_1); | ||
textField_1.setColumns(10); | ||
|
||
JButton btnNewButton = new JButton("Login"); | ||
btnNewButton.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
|
||
JOptionPane.showMessageDialog(null,"Your User name is : "+ textField.getText()+"\n Password is : "+textField_1.getText()); | ||
|
||
} | ||
}); | ||
btnNewButton.setFont(new Font("Inter Black", Font.BOLD, 35)); | ||
btnNewButton.setBounds(386, 444, 210, 60); | ||
frame.getContentPane().add(btnNewButton); | ||
|
||
|
||
|
||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>List_IMPORTANT</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=17 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=17 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.