Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Run this code..plzz

Have Programming Question? Ask it here!
 
 
 


SakthiPrabhu.g
Run this code..plzz
1 Answer(s)      5 years and 8 months ago
Posted in : Java Beginners



Advertisement
View Answers

December 19, 2008 at 5:36 AM


Hi friend,

I am sending code according to your requirement but you are defined in this example what you want to do please explain and send me full code.


import java.awt.*;
import java.awt.Color;
import java.awt.Container;
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.*;

public class TryDemo extends JFrame {

Container con;
JPanel p;
ImageIcon img;
JLabel lb;
JRadioButton r1,r2;
ButtonGroup bg;

public TryDemo() {
System.out.println("welcome");

setLayout(null);
con = getContentPane();
setBounds(0,0,1024,70);
setDefaultCloseOperation(EXIT_ON_CLOSE);

img = new ImageIcon("");
p=new JPanel();
con.add(p);
p.setLayout(null);
p.setBounds(0,0,1024,70);
p.setVisible(true);
lb=new JLabel(img);
p.add(lb);
lb.setBounds(200,30,100,20);
r1=new JRadioButton();
p.add(r1);
r1.setBounds(300,30,100,20);
bg=new ButtonGroup();
bg.add(r1);
r2=new JRadioButton();
p.add(r2);
r2.setBounds(300,30,100,20);
bg.add(r2);

}

public static void main(String args[]) {
new TryDemo();
}
}

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

In this code you are not used

r1=new JRadioButton();

After using above code your code running but not giving proper output. So please explain what you want to add.

Thanks.


Related Tutorials/Questions & Answers:
Run this code..plzz - Java Beginners
Run this code..plzz  Hi Friend... ERROR: Exception in thread "main...;Hi friend, I am sending code according to your requirement but you are defined in this example what you want to do please explain and send me full code
how to run rmi program
how to run rmi program  how to run rmi program
Advertisements
run php code online
run php code online  Is it possible to run PHP Code online
best os to run java
best os to run java  which is best os to run java program
Java run time polymorphism
Java run time polymorphism  What is run-time polymorphism or dynamic method dispatch
Run time polymorphism
Run time polymorphism  What is run time polymorphism or dynamic method dispatch
Needs to Run - Struts
Needs to Run  What are the Fundamentals to Run a Struts Applications
Run XML file
Run XML file  Hi.. How do I execute or run an XML file? please tell me about that Thanks
run project on company lan
run project on company lan  sir, i have create dynamic java project of complaint registration and run on local host http://localhost:8080 and by using ip adress but the problem is how to run it at on company server so
how to run this program?
how to run this program?  how to run java swing program   Java Swing program runs same as a simple java program. There is no difference... with javac and run with java command, same as a simple java program. Learn Swing
Run time error - WebSevices
Run time error  Hello, Anyone know, how run the template files in zend framework.Anybody help me. Rgds, Pras  code to help in solving the problem : protected function _run($template
java not run on my pc
java not run on my pc  i have installed java in pc but when i run and compile any program the massage is display that 'javac' is not recognized as an internal or external command
how to run servlet
how to run servlet  Servlet run procedure for J2EE Software   Hi Friend, Please visit the following links: http://www.roseindia.net/servlets/introductiontoconfigrationservlet.shtml http://www.roseindia.net/servlets
Run time exception
Run time exception  What class of exceptions are generated by the Java run-time system?  Java runtime system generates RuntimeException and Error exceptions
j2me pgrm run
j2me pgrm run  How to run a j2me program   Please visit the following link: J2ME Tutorials
how to run - Java Beginners
how to run   how to run java program... brifely  Hi... to execute or run the program. For ex, If you have the following java program... file on the command prompt using: "javac HelloWorld.java". And then run it using
How to compile and run the JSP
How to compile and run the JSP  Hi Kindly tell me how to run and compile JSP small Program using Tomcat as webserver. I created small program HELLO JSP in HTML and compile the program but it is saying Class o r interface
Run a simple EJB code
Run a simple EJB code  I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving steps (by giving snapshots or writing full procedure)how to run it (any platform
Run a simple EJB code
Run a simple EJB code  I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving steps (by giving snapshots or writing full procedure)how to run it (any platform
run exe on remote client
run exe on remote client  I am making a client server application using netbins 6.1 , Jsp servlet, Mysql5.1... I want to run an batch file or exe... copied files fromserver to client using my application but i cant run it on remote
Need a query to run in db2
Need a query to run in db2  hi all, I need a query to run in DB2 for the following: Table 1- MARKETINGACCOUNTS Fields-ACCOUNTTYPE,Accountnumber; Table 2- ACCOUNTS Fields-LEDGERCODE,ACCOUNTNUMBER,BALANCE FROM THE ABOVE I NEED
compile and run java program
compile and run java program  Hello, everyone!!! I just want to ask if you anyone here knows how to compile java file in linux specifically UBUNTU... do I compile and run this file using the terminal of ubuntu... By the way, I am
run jsp file
run jsp file  how to run the jsp file in varies web servers   Hi Friend, For Apache Tomcat,there is a basic directory structure: webapps-Web Application Folder- WEB INF-classes You have to set the class path also
get integer at run time
get integer at run time  how to get integer value at run time in j2ee using servlets   Hi, You can get the value from request parameter... is the example code: String s =request.getParameter("myvariable"); Integer i
how to run java program
how to run java program  i have jar file. in jar i have so many classes.in one of file i want modify .after modifying file i want replce in jar. please help me to how to generate class and how to replace
Run time problem
Run time problem  when i run a project,it shows an exception like "unable to create MIDlet".It also shows "running with locale:English_united States.1252 running in the identified third party security domain" "please help
java pages run
java pages run  how do we run jsp file in the browser. do we need to install server. could it be run on the xamp server   You need Apache Tomcat Server to run the jsp code over it. Follow these steps to run the simple
couldnt run this program
couldnt run this program  package calculator; import java.util.Scanner; public class calculator{ public static void main(String args[]){ Scanner vin...=firstnum-secondnum; System.out.println("sub is " + sub); } } }print("code
how to run applet - Applet
how to run applet   Hi everybody i am using connecting jdbc in applet program. this is executed successfully with appletviewer command >... then if you got any problem, please send the code. Thanks
unable to run servlet
unable to run servlet  Dear sir/madam i have jdk1.5.0_04 and tomcat...-mapping> 6)Compile your servlet. 7)Run Tomcat server by clicking... servlet. 7)Run Tomcat server by clicking the startup.bat file. This is located
run time error
run time error  my program compile successfully but does not showing output for any program ...   Post your code.   public class... you the following command to compile the code: javac HelloWorld.java Actually
How to run? - Hibernate
How to run?  Hiiiiiiiiiiiii friend.. i am Magesh, doing MCA at Madurai in Tamilnadu. i know little bit about Jsp,Servlet.. But my... Hibernate code in my application?  Hi friend, Hinernate : Hibernate
JSP run problem
JSP run problem  type Exception report message description...; Post your code. It seems that there is a programming error. Check your code.   OK this the code plz help me as quik as possible thnk u
how to run a .exe file in jsp
how to run a .exe file in jsp  i want code for to run a .exe file in jsp
how to run a vlc player in jsp
how to run a vlc player in jsp  how to run a vlc player in jsp
run a batch file through javascript
run a batch file through javascript   How to run a batch file through javascript without prompting
how to run servlet - JSP-Servlet
how to run servlet  pls give me comlete procedure to run the servlet on apache-tomcat 6.0.16 how can i set my classpath, java_home etc. also where i have to save my servlet program and how it compile and then run on web browser
how to run ejb3.0 with jboss4.0.2 - EJB
how to run ejb3.0 with jboss4.0.2  i can install jdk5.0,ant1.7and jboss4.0.2 but i didn't known how run the ejb bean plz help me for my promble
how to run ejb3.0 with jboss4.0.2 - EJB
how to run ejb3.0 with jboss4.0.2  i can install jdk5.0,ant1.7and jboss4.0.2 but i didn't known how run the ejb bean plz help me for my promble
mysql run multiple queries at once
mysql run multiple queries at once  Running two MySQL queries at a time in PHP mysql_query
run servlets using Glassfish V3
run servlets using Glassfish V3  Hello to all, I was wondering how to run servlets using Glassfish V3. I'm using NetBeans 6.7 and need to use servlets, but I don't want to install Tomcat to do so, any suggestions
How to find run time in SQL.
How to find run time in SQL.  I have 10 backend jobs in sql which runs at different time intervals. Sample data is shown below Table name:- Job_Run... 22/10/2010 17:30:00 I want to find the run time of both the jobs. (i.e when i run
JSP handle run-time exceptions
JSP handle run-time exceptions  How does JSP handle run-time exceptions?   You can use the errorPage attribute of the page directive to have uncaught run-time exceptions automatically forwarded to an error processing
how to run jsp appication in eclipse
how to run jsp appication in eclipse  after setting the tomcat in eclipse, i m trying to run jsp page, but the pop up has come that "selection did not contain any resources that can run on server". plase tell me i m new to handle
run a java application - Java Beginners
run a java application  Hai Deepak, I ve set my environment...$1.class,SwingDemo$2.class.But i couldnt run my file.During run time it gives... run any java file.So i want to know the problem actually i had.Thanks in advance
how to compile and run servlet program
how to compile and run servlet program   hello sir/mam i hve installed tomcat5.5 version and also have jdk1.6.0_14 installed but not able to run it or compile i m doing it first tyme pls help me in sorting out this problem. i hve
Java Thread : run() method
() method with example in java thread. Thread run() : All the execution code... will write all the code here, which we want to execute. public void run... the execution code in this method. Example :  This example represents the run
How to run a servlet
How to Run a Servlet       To run a servlet one should follow the steps illustrated below:  Download... enter. If everything is correct your servlet will run.  
run ttime error - Java Beginners
run ttime error  how to compile a client server application using RMI ?  Hi friend, I am sending you a link. This link will help you. Please visit for more information. http://www.roseindia.net/tutorials/rmi/rmi
How Jdbc program can be run??
How Jdbc program can be run??  import java.sql.*; import java.util.... ,but when i run it ,it gives following error-> C:\Program Files\Java... to know what is the problem? and how can i run it successfully? please give me
 

 

 

DMCA.com