Share on Google+Share on Google+

java swings
2 Answer(s)      7 years ago
Posted in : Java Beginners


View Answers

October 15, 2009 at 1:23 PM

Hi Friend,

import java.awt.*;
import java.awt.Image;
import javax.swing.*;
class Test extends JPanel {
private static final long serialVersionUID = 752052456706205768L;

public Test() {

JLabel osname, osversion, osarchitecture, javapathname, javalibrarypath, javatemppath,ostitlelabel;

JTextField osnametext, ostextversion, ostextarch, javatextpath, javatextlibrary, javatemptextpath;

ostitlelabel =new JLabel("Current Working OS");
ostitlelabel.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 16));

osname = new JLabel("OS Name");
osnametext = new JTextField(33);
String osName = System.getProperty("");
osname.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));

osversion = new JLabel("OS Version");
ostextversion = new JTextField(33);
String osVersion = System.getProperty("os.version");
osversion.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));

osarchitecture = new JLabel("OS Architecture");
ostextarch = new JTextField(33);
String osType = System.getProperty("os.arch");
osarchitecture.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));

javapathname = new JLabel("Java Path");
javatextpath = new JTextField(33);
String jPathName = System.getProperty("java.home");
// javapathname.setFont(oldLabelFont);
javapathname.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));

javalibrarypath = new JLabel("Java Library Path");
javatextlibrary = new JTextField(33);
String jlibraryPath = System.getProperty("java.library.path");
javalibrarypath.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));

javatemppath = new JLabel("Java Temp Directory");
javatemptextpath = new JTextField(33);
String jTempPath = System.getProperty("");
javatemppath.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));


ostitlelabel.setBounds(190, 40, 170, 20);

October 15, 2009 at 1:24 PM


osname.setBounds(110, 100, 160, 14);
osnametext.setBounds(290, 100, 180, 20);

osversion.setBounds(110, 140, 160, 14);
ostextversion.setBounds(290, 140, 180, 20);

osarchitecture.setBounds(110, 180, 180, 14);
ostextarch.setBounds(290, 180, 180, 20);

javapathname.setBounds(110, 220, 160, 14);
javatextpath.setBounds(290, 220, 180, 20);

javalibrarypath.setBounds(110, 260, 160, 14);
javatextlibrary.setBounds(290, 260, 180, 20);

javatemppath.setBounds(110, 300, 160, 14);
javatemptextpath.setBounds(290, 300, 180, 20);


public static void main(String[] args) {

JFrame frame = new JFrame();
JTabbedPane pane = new JTabbedPane();
pane.add("OS Verification", new Test());
pane.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));

frame.setSize(200, 200);

Image im = Toolkit.getDefaultToolkit().getImage("C:\\node.jpg");

frame.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 12));
frame.setTitle("ACTIVE MQ - IBM MQ TOOL");
frame.setBounds(250, 250, 650, 500);


Related Tutorials/Questions & Answers:
Java Swings
Java Swings  I am doing one project on java Swings, in this i have created one jframe where i defined some JButtons and Jcombobox's, here i need to insert one JTable with headers(IN CURRENT JFrame only).pls help me urgently
java swings - Java Beginners
java swings   Do you want to add textfields on the JPanel
java swings - Java Beginners
java swings   Hi, I need the code for click the refresh button then list values will be refresh.Please send the code ........... Thanks, Valarmathi
java swings
java swings  hi... I am having multiple swing forms.. when i click on a button another form is going to opening but it is opening as different form... Now i want it to be open dynamically instead separately.... Is there any
java swings
java swings  Hi, I need a sample code for once click the exit tab the frame window will be closed. Instead of button close i need tab close option.Please send the sample code immediately.......?Its very urgent........ Thanks
java swings
java swings  how can we use the shared locks of dbms in java? I am working on a mini project which is based on the eamcet councilling .i am struck with a problem where if a student select a college and a branch and sees
java swings
java swings  Hi, I have one class file using three panel methods,the three methods is used for three tabs.then how can i set the background image.Please send the sample code for me. I already posted two questions,but i didnt get
java swings
java swings  Hi, I need the sample code for how to set the background image using jframe and also set the jtext field and jlable boxes under the bachground image. Please send the code immediately,its very urgent.Please send me
java code using swings
java code using swings  code that should be able to enter data of student details using all swings into the access database using jdbc connectivity
java swings - Java Beginners
java swings   Hi, I need the code for joptionpane with jcombobox. my requirement is click on add button,one joptionpane will come.from the option pane i need to select the combobox values. Please send the sample code
about swings - Java Beginners
about swings   Dear sir,Good evening, i am doing mca sir,i am doing the project in swings,so plz provide the material about swings sir...: Hope
java swings - Java Beginners
java swings   Hi, I already posted the question for three times.... I have two listboxes.If i select first value in the first listbox and moved to second listbox.The next time the same value will not able to move the first
java swings - Swing AWT
write the code for bar charts using java swings.  Hi friend, I swings  I am doing a project for my company. I need a to show....
java swings - Java Beginners
java swings   Hi, I have two classes(two tabbed panes). how can i get the one class jtextfield value into another class method. Please send the code as sson as possible. Thanks, Valarmathi  Hi Friend, Try
java swings - JavaMail
java swings  Hi sir,i am doing a project on swings,i don't have any...://
java swings - Java Beginners
java swings   Hi, This is my code. How can i set the jtextfield...", Font.BOLD, 12)); javapathname = new JLabel("Java Path"); javatextpath = new JTextField(33); javatextpath.setToolTipText("Java Installation Path
java swings - Java Beginners
java swings   Hi , I have two listboxes.I want to move one listbox... correct the value and send it to me. This is my java code package...,because place the xml file in the c:/ directly and run the java code
java swings - Java Beginners
java swings   hi, I posted the same question two times,but i didnt get the reply. Please change the jframe look and feel type of code.please send the code immediately. This is my code package; import
swings - Java Beginners
for this in google, but i got very difficult programs. i am beginner in java swings . i want...); } } For more information, visit the following link: Thanks
java-swings - Java Beginners
java-swings  How to write a program for JTree within a JTable cell in java swings.A table should be displayed when i click on the cell of the table. Please help. Thank u
java swings - Java Beginners
java swings  Hi, I need simple code for JButton JOptionPane.Please send the code. Thanks, Valarmathi
Java-Swings - Java Beginners
Java-Swings  How to set size of JButton depending on it's dynamic caption in java? Here caption is not known at desing time it is geerated at runtime.  Hi friend, Please give in details and full source code where
Java Swings - Java Beginners
Java Swings  hi , I am doing project using netbeans. I have a combobox . I want to add items in that combobox from a method.For this i found... code:
java swings - Java Beginners
java swings  Hi, I need the code for how to jlistbox value enable disable . please send the code as soon as possible. Please its urgent. Thanks, Valarmathi
java swings - Java Beginners
java swings  Hi, I have two listboxes .Move the one listbox value into another listbox using add button.Move the value one by one into another listbox.Please give the code using jpanel. Thanks, Valarmathi
java swings - Java Beginners
java swings  Hi, I already send the question. But i didnt get the reply. I can't able to set the jfiledialog directory selection in the textbox. Please send the code urgently. Thanks, Valarmathi
Java-Swings - Java Beginners
Java-Swings  How to set the size of a JButton,JLabel depending on it's caption?  Hi, import javax.swing.*; import java.awt....:// Thanks
java swings - Java Beginners
java swings  Hi, I need the code for how can i set the joptionpane color(background and foreground). can i set the delay time for joptionpane display. Please send the code .its urgent. Thanks, Valarmathi
java swings - Java Beginners
java swings  Hi, I have JoptionPane combobox,in the joptionpane jcombobox have array of values. If i select one value from the joptionpane combobox ,then the selected value will be displayed in the listbox. Please send
Java-swings - Java Beginners
Java-swings  How to move JLabels in a Frame  Hi friend, plz specify in detail. I am sending you a text drag code one textarea...); } } ------------------------------------------------- Visit for more information:
Java Spring Hibernate Struts Training Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? file location SASLError using PLAIN: not-authorized


Advertisement null