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



Home Answers Viewqa Swing-AWT How to add tabs in right side of a window from top to bottom in swing s
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


raveen
How to add tabs in right side of a window from top to bottom in swing s
1 Answer(s)      2 years and 3 months ago
Posted in : Swing AWT


How to add tabs in right side of a window from top to bottom in swings


Advertisement
View Answers

July 25, 2012 at 3:46 PM


Here is a code that add tabs in right side of a window from top to bottom in swings.

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

public class SetTabLocation extends JPanel {
    public SetTabLocation() {

        this.setLayout(new BorderLayout());
        this.setPreferredSize(new Dimension(400, 200));

        JTabbedPane pane = new JTabbedPane(JTabbedPane.RIGHT);
        pane.addTab("Tab 1", new JPanel().add(new JLabel("This is Tab 1")));
        pane.addTab("Tab 2", new JPanel().add(new JLabel("This is Tab 2")));
        pane.addTab("Tab 3", new JPanel().add(new JLabel("This is Tab 3")));
        this.add(pane, BorderLayout.CENTER);
    }

    public static void main(String[] args) {
        JPanel panel = new SetTabLocation();
        panel.setOpaque(true);
        JFrame frame = new JFrame("JTabbedPane Demo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setContentPane(panel);
        frame.pack();
        frame.setVisible(true);
    }
}


Related Tutorials/Questions & Answers:
How to add tabs in right side of a window from top to bottom in swing s
How to add tabs in right side of a window from top to bottom in swing s  How to add tabs in right side of a window from top to bottom in swings
How to add tabs in right side of a window from top to bottom in swing s
How to add tabs in right side of a window from top to bottom in swing s  How to add tabs in right side of a window from top to bottom in swings
Advertisements
how add tabs at the left side of a pane
how add tabs at the left side of a pane  sir i have added the tabs at the top left corner of the pane, but i am unable to add it at the left side of the pane, so please help me
TRIANGLE OF *S AT THE BOTTOM RIGHT!!! - Java Beginners
TRIANGLE OF *S AT THE BOTTOM RIGHT!!!  My Question is to : "Write... with the right angle at the bottom-right." PROBLEM: Have tried so many times to make the triangle at the right side but couldn't do so. Can you please solve
how to print from right to left in java????
how to print from right to left in java????   can anyone pls tell how to print from right to left in java
GXT Grid moving right side after right alighnment
GXT Grid moving right side after right alighnment  I have created one gxt grid.there are 7 column and last column align as RIGHT .so grid width is moving right side 2px. so how can i fix
how to focus on the new window opened from JSF ?
how to focus on the new window opened from JSF ?  Hi guys, I have commandLink with action which using javascript to open a new window(window.open()). Problem is, the new window opens at background behind the current window
Relative positioning of the child window on top based on the movement of parent window
Relative positioning of the child window on top based on the movement of parent window  Relative positioning of the child window on top based on the movement of parent window
The Window Event - Swing AWT
; } } }); add(exit_button); setVisible(true); setSize(100, 50); setTitle("Window...The Window Event  hey plz i need help here... plz modify..." or "no" and proceed as selected from these options.. thank you.. import
Window State - Swing AWT
Window State  Thanks for you reply. I have already tried the setSize() method of AWT Window and also with JFrame. But I want to Maximize the Window when it is opened by the user and instead of the Maximize
how to add the two tables in same row when generating pdf file from jsp - JSP-Servlet
how to add the two tables in same row when generating pdf file from jsp  How to add the two tables in same row one is left side and other is right side please help me.   Hi Friend, Try the following code
How to align div side by side?
will explain you how you can align the div side by side using CSS. The CSS... all these div's get aligned side by site. Here is the code of the CSS...; property to align the DIV's side by side. Here is the video
How to add value from sql server in dropdownlist
How to add value from sql server in dropdownlist  I have created a hospital management project using jsp servlet, where one form name is patient... id from other table like out patient, and this id will be stored dynamically
How to open a window from a java program (from code)[ (onclick of something text )]
How to open a window from a java program (from code)[ (onclick of something text )]  When I download the code an put it in Eclipse, the applet is run, but on click of the button displayed in the applet, a new window with google
Passing values from child window to parent window.
Passing values from child window to parent window.  Hai, I'm having a requirement ,in that when i open a (pop-up)child window from a parent window... will have some more values in it.The values which are selected from child window
jQuery UI Tabs
jQuery UI Tabs In this section, you will learn about UI tabs .For using UI tabs you need add "jquery-ui-1.8.4.custom.min.js" plug-in in your html.../javascript"> $(function() { $("#tabs").tabs(); }); </script>
Passing values from child window to parent window.
Passing values from child window to parent window.  http://www.roseindia.net/java/pass-value-example/pass-value-child-to-parent.shtml I have gone thru the link but my requirement is checkboxes.can u please explain
how can i remove newline characters and tabs
how can i remove newline characters and tabs   how can i remove newline characters and tabs ? but i wont to using GUI .please help
how to convert php webpage to jpg file/take screenshot from client side
how to convert php webpage to jpg file/take screenshot from client side  how to convert php webpage to jpg file/take screenshot from client side
how to call the parent page from child without refreshing the parent and my parent window uses the master page
how to call the parent page from child without refreshing the parent and my parent window uses the master page   how to call the parent page from child without refreshing the parent and my parent window uses the master page
how to call the parent page from child without refreshing the parent and my parent window uses the master page
how to call the parent page from child without refreshing the parent and my parent window uses the master page   how to call the parent page from child without refreshing the parent and my parent window uses the master page
how to call the parent page from child without refreshing the parent and my parent window uses the master page
how to call the parent page from child without refreshing the parent and my parent window uses the master page   how to call the parent page from child without refreshing the parent and my parent window uses the master page
CSS problem height from top
CSS problem height from top  here i wrote a code but can you tell me how to increase height from top <html> <head> <style type="text/css"> .hello img { height : 100px; width :100px; margin-top
How to delete records from jtabel - Swing AWT
How to delete records from jtabel  hello I am using jtabel.... It is working properly.but now i want to delete rows from tabel at a time one row...); } } ------------------------------ read for more information, http://www.roseindia.net/java/example/java/swing
How to add
How to add   Hi, I want to make a website which will recommend users books according to the genre selected by them. I am using PHP, JavaScript... for it? (what Facebook uses for it (Older posts) link in the bottom of every wall
add button to the frame - Swing AWT
add button to the frame  i want to add button at the bottom..."); // Read data from a table Statement stmt = (Statement...,age from patientdetails1"); ResultSetMetaData rsmd
Setting Window State Maximized - Swing AWT
Setting Window State Maximized  Hello Everyone! I want to set the Window or JFrame Maximized when I open the Frame. It is in normal form when I open it. Is there any method of setting it maximized? How can I do
How to Make iPhone Window Application
How to Make iPhone Window Application  Hi, For Making iphone window application, what parameters i have to follow or provide example related to iphone window application. Thanks
how to add Arraylist filter for a jsp page showing results from a servlet
how to add Arraylist filter for a jsp page showing results from a servlet ... page table of given contents of database, i want to add a filter to it to show only the matched contents from list, the table which is coming out
how to add data dynamically from database into a dropdown list in a jsp
how to add data dynamically from database into a dropdown list in a jsp  hi friends i am doing a project in jsp and oracle as my database.In my... get dynamically from the database and whenever a new person has registered his
Reversing dojo slider to make it slide from right to left rather left to right as given
on slider must start from right side of the slider so that slider slides from right to left(not from left to right as in given example) how can i reverse...Reversing dojo slider to make it slide from right to left rather left to right
Advertisements
 

 

 

DMCA.com