java 2 Answer(s) 2 years and 9 months ago
Posted in : Java Beginners
whats the problem with my code? it's giving me one error illegal start of expression on line 201? and also help me change the colors to their names instead of numbers. thx
public class EmployeeDetails3 extends JFrame {
public EmployeeDetails3() { initComponents(); }
@SuppressWarnings("unchecked")
private void initComponents() {
buttonGroup1 = new JButtonGroup(); buttonGroup2 = new JButtonGroup(); jPanel1 = new JPanel(); jPanel2 = new JPanel(); jPanel4 = new JPanel(); jPanel5 = new JPanel(); jLabel1 = new JLabel(); jTextField1 = new JTextField(); jLabel2 = new JLabel(); jTextField2 = new JTextField(); jLabel4 = new JLabel(); jTextField3 = new JTextField(); jLabel5 = new JLabel(); jTextField5 = new JTextField(); jLabel3 = new JLabel(); jTextField4 = new JTextField(); jPanel6 = new JPanel(); jPanel7 = new JPanel(); jLabel6 = new JLabel(); jScrollPane1 = new JScrollPane(); jTextArea1 = new JTextArea(); jPanel8 = new JPanel(); jPanel9 = new JPanel(); jRadioButton1 = new JRadioButton(); jRadioButton2 = new JRadioButton(); jPanel10 = new JPanel(); jCheckBox1 = new JCheckBox(); jCheckBox2 = new JCheckBox(); jCheckBox3 = new JCheckBox(); jPanel3 = new JPanel(); jButton1 = new JButton(); jButton2 = new JButton(); jButton3 = new JButton(); jButton4 = new JButton(); jButton5 = new JButton(); jButton6 = new JButton();
public void actionPerformed (ActionEvent e) { if(e.getSource()==btn) }
public static void main(String args[]) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { new EmployeeDetails3().setVisible(true); } }); }
}
View Answers
August 28, 2010 at 12:44 PM
Hi Friend,
We have modified your code:
import java.awt.*; import javax.swing.*; import java.awt.event.*; public class EmployeeDetails3 extends JFrame{
public EmployeeDetails3(){ initComponents(); }
@SuppressWarnings("unchecked")
private void initComponents() {
ButtonGroup buttonGroup1 = new ButtonGroup(); ButtonGroup buttonGroup2 = new ButtonGroup(); JPanel jPanel1 = new JPanel(); JPanel jPanel2 = new JPanel(); JPanel jPanel4 = new JPanel(); JPanel jPanel5 = new JPanel(); JLabel jLabel1 = new JLabel(); JTextField jTextField1 = new JTextField(); JLabel jLabel2 = new JLabel(); JTextField jTextField2 = new JTextField(); JLabel jLabel4 = new JLabel(); JTextField jTextField3 = new JTextField(); JLabel jLabel5 = new JLabel(); JTextField jTextField5 = new JTextField(); JLabel jLabel3 = new JLabel(); JTextField jTextField4 = new JTextField(); JPanel jPanel6 = new JPanel(); JPanel jPanel7 = new JPanel(); JLabel jLabel6 = new JLabel(); JScrollPane jScrollPane1 = new JScrollPane(); JTextArea jTextArea1 = new JTextArea(5,20); JPanel jPanel8 = new JPanel(); JPanel jPanel9 = new JPanel(); JRadioButton jRadioButton1 = new JRadioButton(); JRadioButton jRadioButton2 = new JRadioButton(); JPanel jPanel10 = new JPanel(); JCheckBox jCheckBox1 = new JCheckBox(); JCheckBox jCheckBox2 = new JCheckBox(); JCheckBox jCheckBox3 = new JCheckBox(); JPanel jPanel3 = new JPanel(); JButton jButton1 = new JButton(); JButton jButton2 = new JButton(); JButton jButton3 = new JButton(); JButton jButton4 = new JButton(); JButton jButton5 = new JButton(); JButton jButton6 = new JButton();
java
java hi im new to java plz suggest me how to master java....saifjunaid@gmail.com
java java How to set java Policy for applet using jdk 6
java
java dear,
i want a field for date picker using java/java script
java
java create java program for delete and update the details,without using database, just a normal java program
java
java why methods in java raise exceptions
Have a look at the following link:
Java Exceptions
java java code to search the nodes how to write the java code to search the nodes using routers
java java online telephone directory i need coding for online telephone directory..by using java....pls help me
java
java how to edit text document by using java
then how to edit starting and ending of text document by using java
java
java different between java & core java
print("code sample
java
java different between java & core java
print("code sample
java java pattern code for a given words java pattern code for a given words pattern
java
java how can use sleep in java
which book learn of java language
java
java java swing
Swing is a principal GUI toolkit for the Java programming language. It is a part of the JFC (Java Foundation Classes), which is an API for providing a graphical user interface for Java programs
java
java how to prepare the java
Hi Friend,
If you want to learn how to install java, creating and running a java program then go through the following links:
http://www.roseindia.net/java/beginners/index.shtml
http
java
java what is the need of java if java is not there what will happen... work unless you have Java installed, and more are created every day. Java... to scientific supercomputers, cell phones to the Internet, Java is everywhere!
http
java
java 1.what type of inheritance supported in java.
2.what is the advantage of java over C++.
Hi Friend,
Java supports following... inheritance
Advantages of Java over C++:
1)Java is pure object oriented
java
java how to run applets in java
Hi,
In Java you can use Applet viewer to run the applet. Read more at Java Applet Viewer tutorial page.
Thanks
java
java what is javaJava is a programming language..., and business applications.
Advantages of Java:
* Java is simple, easy to design... programming languages.
* Java is object-oriented, that is used to build modular
Java Java What is the immediate superclass of the Dialog class