Home Answers Viewqa Java-Beginners Hi da SAKTHI ..check thiz

 
 


SakthiPrabhu.g
Hi da SAKTHI ..check thiz
3 Answer(s)      4 years and 6 months ago
Posted in : Java Beginners

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 Pages:
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
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
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
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 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 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
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
What is CHECK Constraint?
What is CHECK Constraint?  What is CHECK Constraint?   Hi, The CHECK constraint is used to limit the value range that can be placed in a column.The SQL CHECK constraint ensures that all values in a column satisfy
check condition in if-else block
check condition in if-else block  Hi, I want to update database with following query int i= st.executeUpdate("Insert into text_editor(words) values('"+words+"')"); how can I give a check option so only valid words are inserted
hi Friend... - Java Beginners
plz Explain this...Thank u.. Sakthi   Hi friend, Java IO...hi Friend...  Hi friend... I have to import only " The System.out.println " Function Not any other Input Function ..How should i import
How to check a checkbox - Struts
How to check a checkbox  Hello Community, How can i check a checkbox defined with tags. with plain html, the tag checks the box. with the other... please help me with the syntax??  Hi friend, my checkbox
check
updated"); will the above code check if the user has entered value for empcode
hi.... - Java Beginners
hi....  Hi friends i am using ur sending code but problem is not solve my code is to much large i am this code please check it and solve its very urgent   Hi ragini, First time put the hard code after
hi - Java Beginners
hi  hi sir, i want to create a jtable(with check boxes) by using vector(i am add a columnames and data by using vector) and i want to add a check box for every row in jtable.and when i am selected a check box
Hi.... - Java Beginners
Hi....  Hi Friends when i compile jsp file then got... solution and let me know what is the error its very urgent  Hi Ragini, Please check the insertion query and if any problem then send me code
Hi... - Java Beginners
Hi...  Hi, I want make a date fields means user click date... Write JavaScript link with button   Check ur mail for the detail code; if any one need just mail me: fightclub_ceo@sify.com   Hi
Check Box Validation in PHP - PHP
Check Box Validation in PHP  How can validations done on check boxes more than 3?  Hi Friend, Please visit the following link: http://www.roseindia.net/java/javascript-array/javascript-array-checkboxes.shtml
How to check no records - JSP-Servlet
How to check no records  Hi all, I am developing an onlineshopping project, in that how i have 2 check no records. I saw an answer... to check and display your cart is empty.... PLs help me......... Reply
dojo check tree code - Ajax
dojo check tree code  Hi..Boss Thanks for ur site. it helped me so many times.. my problem is while trying to use dojo tree with check boxes facing some issues i tried with two examples but i failed to do that http
Check the File Exists in PHP Program
Check the File Exists in PHP Program  Hi, I trying to create a application to find or retrieve the existing files. So, Please help me or suggest any online reference that explain about the file exists function in PHP? Thanks
How to check whether database exists?
How to check whether database exists?  Hi, I have to create... to creating the database, i want to check whether database exists or not? How can i do this check. can any one help me on this. Please find thesample code
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
Applet - spell check program - Applet
Applet - spell check program  hi, i am writing a applet program -say ' spelling checking utility ' i need to a read text file and check whether the words in that file are correct. what have i done: i have created
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: 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   '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   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  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. Array is always declared in the following ways: 1)int arr[]=new int[5]; 2)int arr
hi
hi  what is the code for printing stars as follows * * * * * * * * * *print("code sample");   Hi Friend, Try this: public class PatternExample { public static void main(String[] args) { int
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
Hi   I need some help I've got my java code and am having difficulty to spot what errors there are is someone able to help import java.util.Scanner; public class Post { public static void main(String[] args) { Scanner sc
hi.......
hi.......  i've a project on railway reservation... i need to connect netbeans and mysql with the help of jdbc driver... then i need to design... for such a programme... plz help me...   Hi Friend, Try this: import java.awt.
hi!
hi!  public NewJFrame() { initComponents(); try { Class.forName("java.sql.Driver"); con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","admin"); } catch(Exception e