Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

Tabbed in java



Share on Google+Share on Google+

santosh satnami
Tabbed in java
1 Answer(s)      6 years and 7 months ago
Posted in : Java Beginners

hello sir i want to use tabbed in my project and i want that if i clicked one tabbed then open one form and if i click another tabbed then it open another form

can plz help me

Thank you

View Answers

December 22, 2010 at 11:12 AM

Hello Friend,

Try the following code:

import java.awt.*;
import javax.swing.*;

class Information {
JFrame f;
JPanel p1,p2;
JTabbedPane tp;
JLabel l1, l2, l3, l4,l5,l6,l7,l8;
JTextField tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8;
JButton add1,add2 ;

f=new JFrame("Form");
p1=new JPanel(new GridLayout(5,2));
p2=new JPanel(new GridLayout(5,2));
tp=new JTabbedPane();
l1=new JLabel("Name:");
l2=new JLabel("Address:");
l3=new JLabel("Contact No:");
l4=new JLabel("Email:");

l5=new JLabel("Highschool:");
l6=new JLabel("Intermediate:");
l7=new JLabel("Graduation:");
l8=new JLabel("Post Graduation:");
tf1=new JTextField(12);
tf2=new JTextField(12);
tf3=new JTextField(12);
tf4=new JTextField(12);
tf5=new JTextField(12);
tf6=new JTextField(12);
tf7=new JTextField(12);
tf8=new JTextField(12);
add1=new JButton(" Add ");
add2=new JButton(" Add");


tp.addTab("Personal Information",p1);
tp.addTab("Professional Information",p2);

public static void main(String z[]){
new Information();



Related Tutorials/Questions & Answers:
Tabbed in java
Tabbed in java  hello sir i want to use tabbed in my project and i want that if i clicked one tabbed then open one form and if i click another tabbed then it open another form can plz help me Thank you   Hi Friend
Tabbed in java
Tabbed in java  hello sir i want to use tabbed in my project and i want that if i clicked one tabbed then open one form and if i click another tabbed then it open another form can plz help me Thank you   Hello Friend
Set the Color of a Tab in a Tabbed Pane Container in Java
Set the Color of a Tab in a Tabbed Pane Container in Java... will learn how to set colors for a tab in a tabbed pane container in Java Swing... shows you how to set the color for each tab in the tabbed pane container
tabbed panel Helppp !!!! - Struts
tabbed panel help  i need struts tabbed panel example. Hi everybody plz ,im newbie on struts. i have to developpe a web application using struts 1.1, somebody advise me to use Tabbed Panel but i don't know how to use them
color changing - Java Beginners
in java swing  Hi Friend, Try the following code: import javax.swing....){ JFrame frame = new JFrame("Tabbed Pane Frame..., BorderLayout.CENTER); tab.add("Tab 1", new JLabel("This is Tabbed Pane 1")); tab.add
java JTabbedPane() - Java Beginners
java JTabbedPane()  how to add layout manager in JTabbedPane() plese...; private JPanel panel3; public TabbedPaneTest(){ setTitle("Tabbed Pane... createPage1(); createPage2(); createPage3(); // Create a tabbed pane
java swings - Java Beginners
java swings  Hi , I need the JFileDialog simple example using jbutton. I need to put the browse option for my tabbed pane screen. Please send the favourable example code. Thanks, Valarmathi  Hi Friend, Try
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
XML and swings - Java Beginners
XML and swings  I have an xml file where all the contents that should be present in the tabbed pane are there. i would like to know how to parse the xml such that, whenever it reads the component type as label, it should create
java - Java Beginners
(); Component panel1 = makeTextPanel("Java Tutorial"); tabbedPane.addTab("One", icon... panel2 = makeTextPanel("Java, JavaScript,JSP"); tabbedPane.addTab("Two", icon, panel2, "Does twice as much nothing"); Component panel3 = makeTextPanel("Java
Jtabbedpane - Java Beginners
with the user by this button. So...;Java Example for adding abstarct JButton...(tab, BorderLayout.CENTER); JButton   Java Example for adding abstarct... = new JFrame("Tabbed Pane Frame"); frame.setDefaultCloseOperation
java - Java Beginners
two Panels(p1 and p2) and one tabbed pane(tp) in which i have added second panel(p2). on panel 1 i have one button(Go to Tabbed Pane). I want, when i will click on this button, then the tabbed pane should be added to the frame like
JAVA SWING JTabbedPane - Java Beginners
JAVA SWING JTabbedPane  Hi all, I would like to ask a question... = makeTextPanel("Java Tutorial"); tabbedPane.addTab("One", icon, panel1, "Does... = makeTextPanel("Java, JavaScript,JSP"); tabbedPane.addTab("Two", icon
java - Java Beginners
"); } } } how can i add the path from my tabbed pane textbox . I didnt get the path... the path to the tabbed pane in file? Thanks  ...(osType); javapathname = new JLabel(" Java Path
Tomahawk pannelTabbedPane tag
to create a tabbed pane. Its has the capability of switching the tabs at client... when the element is clicked.  ondblclick : It is used for Java...; onmousedown : It is used for Java Script code to be invoked when the pointing
java - Java Beginners
regarding os information and java information for the same class using java swing tabbed panes. this is my code .please revert the mistake and send it to me... = new JScrollPane(area3); label4 = new JLabel("Java Path"); area4 = new
Hi ..I am Sakthi.. - Java Beginners
that is available in java and also starts with javax. package HEMAL RAJYAGURU  ... tabbedPane = new JTabbedPane(); Component panel1 = makeTextPanel("Java... = makeTextPanel("Java, JavaScript,JSP"); tabbedPane.addTab("Two", icon, panel2
java  diff bt core java and java
Java Complication Error - Java Beginners
Java Complication Error  Hello there, I was assigned to do a project in java that I have to set up tabs and in each tab have something in them. Well...(); // Creates a tabbed pane jtabbedPane = new JTabbedPane
java  what is java
JAVA  how the name came for java language as "JAVA
java   why iterator in java if we for loop
java  explain technologies are used in java now days and structure java
java  different between java & core java
Java   Whether Java is pure object oriented Language
java  is java open source
java  what is java reflection
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java   What is ?static? keyword
java  RARP implementation using java socket