 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Program to display JTabbedPane on the right
To display JTabbedPane on the right, you need to set the location to the right using the constant RIGHT −
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.RIGHT);
The following is an example to display JTabbedPane on the right −
Example
package my; import javax.swing.*; public class SwingDemo {    public static void main(String args[]) {       JFrame frame = new JFrame("Technologies");       JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.RIGHT);       JPanel panel1, panel2, panel3, panel4, panel5;       panel1 = new JPanel();       panel2 = new JPanel();       panel3 = new JPanel();       panel4 = new JPanel();       panel5 = new JPanel();       tabbedPane.addTab("PHP", panel1);       tabbedPane.addTab("Blockchain ", panel2);       tabbedPane.addTab("Matlab", panel3);       tabbedPane.addTab("JSP ", panel4);       tabbedPane.addTab("Servlet", panel5);       frame.add(tabbedPane);       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);       frame.setSize(550,350);       frame.setVisible(true);    } }  Output

Advertisements
 