- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to specify tab location to make it visible in the bottom with Java?
Use the setTabPlacement() method to set the tab location. To make it visible in the bottom, use the BOTTOM constant −
JTabbedPane tabbedPane = new JTabbedPane(); tabbedPane.setTabPlacement(JTabbedPane.BOTTOM);
The following is an example to specify tab location to make it visible in the bottom −
package my; import javax.swing.*; import java.awt.*; import java.awt.event.KeyEvent; public class SwingDemo { public static void main(String args[]) { JFrame frame = new JFrame("Technologies"); JTabbedPane tabbedPane = new JTabbedPane(); JPanel panel1, panel2, panel3, panel4, panel5; panel1 = new JPanel(); panel2 = new JPanel(); panel3 = new JPanel(); panel4 = new JPanel(); panel5 = new JPanel(); tabbedPane.setTabPlacement(JTabbedPane.BOTTOM); 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
- Related Articles
- Menu not visible in IE8. How to make it visible with HTML?
- How to specify the bottom position of 3D elements with CSS
- How to specify the number of visible options for in HTML?
- How to specify that the details should be visible to the user in HTML?
- How to add a Tab in JTabbedPane with Java?
- Specify the bottom padding of an element with CSS
- Make the JSlider vertical and move top-to-bottom in Java
- How to return true if the bottom of the page is visible using JavaScript?
- How to disable a Tab in a JTabbedPane Container with Java?
- How to specify the usage of an element using the tabbing order (tab keyboard button) in HTML?
- How to set location of JLabel in a JFrame with Java?
- C Sharp with Selenium - How to Switch one tab to another tab in Csharp Selenium?
- How to make active tab in navigation menu using HTML CSS & JavaScript?
- How to get the Tab Size of a JTextArea in Java?
- How to set the background color of a single tab in a JTabbedPane Container with Java?

Advertisements