Run this code..plzz

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
Run time polymorphism
Run time polymorphism  What is run time polymorphism or dynamic method dispatch
Java run time polymorphism
Java run time polymorphism  What is run-time polymorphism or dynamic method dispatch
best os to run java
best os to run java  which is best os to run java program
ModuleNotFoundError: No module named 'run'
ModuleNotFoundError: No module named 'run'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'run' How to remove the ModuleNotFoundError: No module named 'run' error
ModuleNotFoundError: No module named 'run'
ModuleNotFoundError: No module named 'run'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'run' How to remove the ModuleNotFoundError: No module named 'run' error
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 thatADS_TO_REPLACE_1 Thanks
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
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 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
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
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 - 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
j2me pgrm run
j2me pgrm run  How to run a j2me program   Please visit the following link: J2ME Tutorials
how to run servlet
how to run servlet  Servlet run procedure for J2EE Software   Hi Friend, Please visit the following links:ADS_TO_REPLACE_1 http://www.roseindia.net/servlets/introductiontoconfigrationservlet.shtml http
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 .exe from a class
Run a .exe from a class  how to lauch a .exe file from a class in Java and to check the success ful execution of the same
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
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... Here is the example code: String s =request.getParameter("myvariable"); Integer
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..._TO_REPLACE_1 how do I compile and run this file using the terminal of ubuntu
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
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 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:ADS_TO_REPLACE_1 webapps-Web Application Folder- WEB INF-classes You have to set
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
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
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? - 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
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
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
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
Version of com.kennycason>run dependency
List of Version of com.kennycason>run dependency
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 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
java program run on thml page?
java program run on thml page?  how to run java program on html page using text area
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.  ADS
ModuleNotFoundError: No module named 'cirrus-run'
ModuleNotFoundError: No module named 'cirrus-run'  Hi, My Python... 'cirrus-run' How to remove the ModuleNotFoundError: No module named 'cirrus-run' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'notify-run'
ModuleNotFoundError: No module named 'notify-run'  Hi, My Python... 'notify-run' How to remove the ModuleNotFoundError: No module named 'notify-run' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'parallel_run'
ModuleNotFoundError: No module named 'parallel_run'  Hi, My Python... 'parallel_run' How to remove the ModuleNotFoundError: No module named 'parallel_run' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pip-run'
ModuleNotFoundError: No module named 'pip-run'  Hi, My Python...-run' How to remove the ModuleNotFoundError: No module named 'pip-run... to install padas library. You can install pip-run python with following command
ModuleNotFoundError: No module named 'quantaxis-run'
ModuleNotFoundError: No module named 'quantaxis-run'  Hi, My... 'quantaxis-run' How to remove the ModuleNotFoundError: No module named 'quantaxis-run' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'radish-run'
ModuleNotFoundError: No module named 'radish-run'  Hi, My Python... 'radish-run' How to remove the ModuleNotFoundError: No module named 'radish-run' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'remote-run'
ModuleNotFoundError: No module named 'remote-run'  Hi, My Python... 'remote-run' How to remove the ModuleNotFoundError: No module named 'remote-run' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'run-dbcan'
ModuleNotFoundError: No module named 'run-dbcan'  Hi, My Python... 'run-dbcan' How to remove the ModuleNotFoundError: No module named 'run... have to install padas library. You can install run-dbcan python with following