Hi da SAKTHI ..check thiz

Hi da SAKTHI ..check thiz

View Answers

December 26, 2008 at 1:04 AM

Hi friend,

Plz give details of "MainMenu.java" to solve the problem :

http://www.roseindia.net/java/example/java/awt/


Thanks


December 26, 2008 at 3:22 AM

Hi friend,

I saw your code and modified. What you want to do please explain in detail.

package javacode;

import java.lang.*;
import java.awt.*;
import java.sql.*;
import java.awt.Color;
import java.awt.Container;
import java.awt.event.*;
import javax.swing.ButtonGroup;
import javax.swing.border.LineBorder;
import javax.swing.*;

public class Votec extends JFrame implements ActionListener{
Connection conn = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";
Statement st= null;
ResultSet rs = null;
Container con;
JPanel p1;
ImageIcon img1,img2,img3,img4,img5;
JLabel lb1,lb2,lb3,lb4,lb5,lb6;
JRadioButton r1,r2,r3,r4,r5;
ButtonGroup bg;
// MainMenu menu;
Votec(){
setLayout(null);
con=getContentPane();
setBounds(0,0,800,600);
setDefaultCloseOperation(EXIT_ON_CLOSE);
img1=new ImageIcon("/home/vinod/workspace/CodeDevelopment/javacode/images.jpg");
img2=new ImageIcon("f:\\Q1.jpg");
img3=new ImageIcon("f:\\jp.jpg");
img4=new ImageIcon("f:\\j2.gif");
img5=new ImageIcon("f:\\j3.gif");
p1=new JPanel();
con.add(p1);
p1.setLayout(null);
p1.setBounds(100,100,500,400);
p1.setVisible(true);
lb1=new JLabel(img1);
lb2=new JLabel(img2);
lb3=new JLabel(img3);
lb4=new JLabel(img4);
lb5=new JLabel(img5);
lb6=new JLabel("SELECT YOUR CHOICE FROM THE LIST BELOW");
p1.add(lb1);
p1.add(lb2);
p1.add(lb3);
p1.add(lb4);
p1.add(lb5);
p1.add(lb6);
p1.setBorder(new LineBorder(Color.BLACK));
bg=new ButtonGroup();
r1=new JRadioButton("ADMK");
r2=new JRadioButton("DMK");
r3=new JRadioButton("CONGRESS");
r4=new JRadioButton("BJP ");
r5=new JRadioButton("STUDENTS");
lb1.setBounds(200,100,100,50);
r1.setBounds(300,100,100,20);
lb2.setBounds(200,150,100,20);
r2.setBounds(300,150,100,20);
lb3.setBounds(200,200,100,20);
r3.setBounds(300,200,100,20);
lb4.setBounds(200,250,100,20);
r4.setBounds(300,250,100,20);
lb5.setBounds(200,300,100,20);
r5.setBounds(300,300,100,20);
lb6.setBounds(200,0,280,70);
p1.add(r1);
bg.add(r1);
p1.add(r2);
bg.add(r2);
p1.add(r3);
bg.add(r3);
p1.add(r4);
bg.add(r4);
p1.add(r5);
bg.add(r5);
setVisible(true);
r1.addActionListener(this);
r2.addActionListener(this);
r3.addActionListener(this);
r4.addActionListener(this);
r5.addActionListener(this);
}
public static void main(String args[]){
new Votec();
}

December 26, 2008 at 3:24 AM

public void actionPerformed(ActionEvent ae){
if(ae.getSource()==r1){

try{//CODE SHUD COME HERE DA....CHECK THIZ

Class.forName(driver);
conn = DriverManager.getConnection(url+db,userName,password);

// ResultSet rs = st.executeQuery("Select id,name,lsname from userinform");
// Screen.showMessage("You have Selected the ADMK ");
}
catch(Exception e){
System.out.println("Exception thrown.."+e);
}
}
if(ae.getSource()==r2){
// st=conn.createStatement;
// st.executeUpdate(query);
/* String query="insert into tb1 values");
st.executeQuery(query);
while(rs.next()){
rs.getString(1));
}
if(rs.getString(14).equalsScreen.showMessage("you have selected d DMK ");
if(ae.getSource()==r3)
Screen.showMessage("you have selected d CONGRESS ");
if(ae.getSource()==r4)
Screen.showMessage("you have selected d BJP ");
if(ae.getSource()==r5){
Screen.showMessage(" You've selected d STUDENTS ");
Screen.showMessage(" DON WORRY WE'ILL ROCK ");
}*/
}
}
}

-----------------------------------------


Thanks.









Related Tutorials/Questions & Answers:
Hi da SAKTHI ..check thiz - Java Beginners
Hi da SAKTHI ..check thiz  package bio;//LEAVE IT import java.lang.... actionPerformed(ActionEvent ae) { if(ae.getSource()==r1){ try{//CODE SHUD COME HERE DA....CHECK THIZ String url = "jdbc:odbc:bioDB"; Class.forName
CHECK THIZ.... - Java Beginners
CHECK THIZ....  Hi friend... import java.io.*; class Plus { public static void main(String args[]) { int a=10; int b= 25; System.out.println... ( + --> PLUS ) In the Above LINE }}   Hi friend, The Java language
Advertisements
hi sakthi prasanna here - Java Beginners
; if(ae.getSource()==r1){ try{//CODE SHUD COME HERE DA....CHECK THIZ //String url...hi sakthi prasanna here  import java.lang.*; import java.awt....) { e.printStackTrace(); } // TODO: handle exception }}}   Hi friend
Hi Check this.... - Java Beginners
Hi Check this....  Hi Sakthi here.. Run This Code..   Hi sakthi Your code is not visible here, can u send again please.. Thanks
Hi ..I am Sakthi.. - Java Beginners
Hi ..I am Sakthi..  can u tell me Some of the packages n Sub Directories starts with... import javax.swing.*; import javax._________;  ...;Hi friend, package javacode; import javax.swing.*; import
Hi ...CHECK - Java Beginners
Hi ...CHECK  Hi Da..sakthi Here RUN THIS CODE ----- package bio; import java.lang.*; import java.awt.*; import java.awt.Color; import... "); Screen.showMessage(" DON WORRY WE'ILL ROCK "); } } }   Hi
HI Jsp check box..!
HI Jsp check box..!  Hi all.. I want to update the multiple values of database table using checkbox..after clicking submit the edited field has to update and rest has to enable to update...please help me..its urgent
ModuleNotFoundError: No module named 'da'
ModuleNotFoundError: No module named 'da'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'da' How to remove the ModuleNotFoundError: No module named 'da' error
ModuleNotFoundError: No module named 'da'
ModuleNotFoundError: No module named 'da'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'da' How to remove the ModuleNotFoundError: No module named 'da' error
ModuleNotFoundError: No module named 'da'
ModuleNotFoundError: No module named 'da'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'da' How to remove the ModuleNotFoundError: No module named 'da' error
ModuleNotFoundError: No module named 'DA-DAPPER'
ModuleNotFoundError: No module named 'DA-DAPPER'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'DA-DAPPER' How to remove the ModuleNotFoundError: No module named 'DA
ModuleNotFoundError: No module named 'DA-DAPPER'
ModuleNotFoundError: No module named 'DA-DAPPER'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'DA-DAPPER' How to remove the ModuleNotFoundError: No module named 'DA
ModuleNotFoundError: No module named 'da-gcp'
ModuleNotFoundError: No module named 'da-gcp'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'da-gcp' How to remove the ModuleNotFoundError: No module named 'da-gcp'
ModuleNotFoundError: No module named 'da_tracker'
ModuleNotFoundError: No module named 'da_tracker'  Hi, My Python... 'da_tracker' How to remove the ModuleNotFoundError: No module named 'da_tracker' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'da_tracker'
ModuleNotFoundError: No module named 'da_tracker'  Hi, My Python... 'da_tracker' How to remove the ModuleNotFoundError: No module named 'da_tracker' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'python_da'
ModuleNotFoundError: No module named 'python_da'  Hi, My Python... 'python_da' How to remove the ModuleNotFoundError: No module named 'python_da' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'python_da'
ModuleNotFoundError: No module named 'python_da'  Hi, My Python... 'python_da' How to remove the ModuleNotFoundError: No module named 'python_da' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'yobs_da'
ModuleNotFoundError: No module named 'yobs_da'  Hi, My Python..._da' How to remove the ModuleNotFoundError: No module named 'yobs_da' error? Thanks   Hi, In your python environment you have
ModuleNotFoundError: No module named 'DA-DAPPER'
ModuleNotFoundError: No module named 'DA-DAPPER'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'DA-DAPPER' How to remove the ModuleNotFoundError: No module named 'DA
ModuleNotFoundError: No module named 'da-gcp'
ModuleNotFoundError: No module named 'da-gcp'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'da-gcp' How to remove the ModuleNotFoundError: No module named 'da-gcp'
ModuleNotFoundError: No module named 'Da-Ponz'
ModuleNotFoundError: No module named 'Da-Ponz'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'Da-Ponz' How to remove the ModuleNotFoundError: No module named 'Da-Ponz
ModuleNotFoundError: No module named 'da_tracker'
ModuleNotFoundError: No module named 'da_tracker'  Hi, My Python... 'da_tracker' How to remove the ModuleNotFoundError: No module named 'da_tracker' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'da-vinci'
ModuleNotFoundError: No module named 'da-vinci'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'da-vinci' How to remove the ModuleNotFoundError: No module named 'da-vinci
ModuleNotFoundError: No module named 'django-da-login'
ModuleNotFoundError: No module named 'django-da-login'  Hi, My... named 'django-da-login' How to remove the ModuleNotFoundError: No module named 'django-da-login' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-da-login'
ModuleNotFoundError: No module named 'django-da-login'  Hi, My... named 'django-da-login' How to remove the ModuleNotFoundError: No module named 'django-da-login' error? Thanks   Hi, In your python
Hi,
Hi,  Hi,what is the purpose of hash table
Hi,
Hi,   labels = new Hashtable<Integer,JLabel>
Hi..
Hi..   what are the keywords available in simple HelloWorld program
Hi..
Hi..  what are access specifier available in java
HI.
HI.  hi,plz send me the code for me using search button bind the data from data base in dropdownlist
Hi..
Hi..  null is a keyword.True/False?   hi friend, In Java true, false and null are not a Java keyword they are literals in Java. For reading in detail go through the following link The null keyword
hi,
hi,  print("code sample");how to display all elements in 2d array usin any one loop
Hi
Hi  Hi this is really good example to beginners who is learning struts2.0 thanks
Hi
Hi  Hi How to implement I18N concept in struts 1.3? Please reply to me
hi....
hi....  plzz sent me d code for counting vowels in a string... gui programme
Hi
Hi   how to read collection obj from jsp to servlet and from jsp - jsp?   Hi Friend, Please visit the following link:ADS_TO_REPLACE_1 http://www.roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks
Hi
Hi  I want import txt fayl java.please say me...   Hi, Please clarify your problem! Thanks
hi....
hi....  a programme which displays a combobox which contains num from 1 to 10 and calculates the factorial of dt num which user clicks
hi
hi   I have connected mysql with jsp in linux and i have used JDBC connectivity but when i run the program, its not working the program is displaying
hi
hi   'print("code sample");`class example(){ public.static.void.main(); system.out.println("this is first pro");}   class example{ public static void main(String[]args){ System.out.println("this is first pro
Hi
Hi  Hi All, I am new to roseindia. I want to learn struts. I do not know anything in struts. What exactly is struts and where do we use it. Please help me. Thanks in advance. Regards, Deepak
Hi..
Hi..  diff between syntax and signature?   signature is a particular identity of a method in terms of its argument order ,type and their number e.g. void A(arguments) then here the order ,type and number of arguments
hi!
hi!  how can i write aprogram in java by using scanner when asking user to enter element user will be free to enter any type that he/she wants to to enter, like(int,double,float,String,....) thanx for answering....   Hi
hi
hi  int A[]=new int{2,5,4,1,3}; what is the error in declaration of this   Hi Friend, This is the wrong way of declaring an array.ADS_TO_REPLACE_1 Array is always declared in the following ways: 1)int arr[]=new int[5
hi
hi  what is the code for printing stars as follows * * * * * * * * * *print("code sample");   Hi Friend, Try... num=4; int p = num; int q = 0; for (int i = 0; i <= num; i++) { for (int j
hi
online multiple choice examination  hi i am developing online multiple choice examination for that i want to store questions,four options,correct answer in a xml file using jsp or java?can any one help me?   Please
hi
hi   on clicking on button on 1st jsp page i want to display following options like friends,family,doctor etc.on next jsp page and also i want link to those options through which i can save the data from 1st jsp in different
hi
hi   on clicking on button on 1st jsp page i want to display following options like friends,family,doctor etc.on next jsp page and also i want link to those options through which i can save the data from 1st jsp in different
Hi..
Hi..  what are the steps mandatory to develop a simple java program?   To develop a Java program following steps must be followed by a Java developer : First of all the JDK (Java Development Kit) must be available
hi.......
){ } } can anyone tell wts wrong with this code??   Hi, Check it: import...hi.......  import java.awt.; import java.sql.*; import javax.swing.*; import java.awt.event.* public class NewJFrame extends javax.swing.JFrame

Ads