Run this code..plzz

Ads
 

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.

Ads









Related Tutorials/Questions & Answers:
how to run rmi program
how to run rmi program  how to run rmi program
best os to run java
best os to run java  which is best os to run java program
Advertisements
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
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
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
j2me pgrm run
j2me pgrm run  How to run a j2me program   Please visit the following link: J2ME Tutorials
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 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
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
Version of com.kennycason>run dependency
List of Version of com.kennycason>run dependency
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 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
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
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
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
ModuleNotFoundError: No module named 'ansible-run'
ModuleNotFoundError: No module named 'ansible-run'  Hi, My Python... 'ansible-run' How to remove the ModuleNotFoundError: No module named 'ansible-run' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'Flask-Run'
ModuleNotFoundError: No module named 'Flask-Run'  Hi, My Python... 'Flask-Run' How to remove the ModuleNotFoundError: No module named 'Flask-Run' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'home-run'
ModuleNotFoundError: No module named 'home-run'  Hi, My Python... 'home-run' How to remove the ModuleNotFoundError: No module named 'home-run... to install padas library. You can install home-run python with following
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
ModuleNotFoundError: No module named 'run-and-retry'
ModuleNotFoundError: No module named 'run-and-retry'  Hi, My... 'run-and-retry' How to remove the ModuleNotFoundError: No module named 'run-and-retry' error? Thanks   Hi, In your python

Ads