Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7179545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:09:42+00:00 2026-05-28T17:09:42+00:00

As you can see from the image below, the Java text is horizontal. What

  • 0

As you can see from the image below, the Java text is horizontal. What I would like to do is get a vertical orientation of the JTabbedPane Titles.

While googling, I found that the only way is to add extra library. But I was wondering if this can be done without any extra library?

I would like for Title1 and Title2 to be vertically oriented and not horizontally

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:09:43+00:00Added an answer on May 28, 2026 at 5:09 pm

    you have to use Html syntax, for any changes to the disabled Tab too

    tabbedPane.addTab("<html>T<br>i<br>t<br>t<br>l<br>e<br>1</html>", panel1);  
    

    EDIT

    SSCCE for question about Html text formatting and alignment

    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextField;
    
    /**
     *
     * @author korbel
     */
    public class TestTabbedPane extends JFrame {
    
        private static final long serialVersionUID = 1L;
        private JTabbedPane tabbedPane;
    
        public TestTabbedPane() {
            tabbedPane = new JTabbedPane();
            tabbedPane.setPreferredSize(new Dimension(300, 200));
            getContentPane().add(tabbedPane);
            JPanel panel = new JPanel();
            tabbedPane.add(panel, "null");
            JTextField one = new JTextField("one");
            tabbedPane.add(one, "one");
            JTextField two = new JTextField("two");
            tabbedPane.add(two, "<html> T<br>i<br>t<br>t<br>l<br>e <br> 1 </html>");
            tabbedPane.setEnabledAt(2, false);
            /*int comp = tabbedPane.getComponentCount();
            for (Component sc : tabbedPane.getComponents()) {
            if (sc instanceof javax.swing.JLabel) {
            JLabel lbl = (JLabel) sc;
            lbl.setForeground(Color.red);
            }
            if (sc instanceof javax.swing.JPanel) {
            JPanel pnl = (JPanel) sc;
            pnl.setName(pnl.getName());
            }
            if (sc instanceof javax.swing.JTextField) {
            JTextField txt = (JTextField) sc;
            txt.setForeground(Color.blue);
            txt.setDisabledTextColor(Color.red);
            }
            }
            UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
            UIManager.put("TabbedPane.highlight", new Color(255, 0, 0));
            UIManager.put("TabbedPane.lightHighlight", new Color(0, 255, 0));
            UIManager.put("TabbedPane.darkShadow", new Color(0, 255, 0));
            UIManager.put("TabbedPane.shadow",new Color(0, 0, 255));
            UIManager.put("TabbedPane.light" ,  new Color(0, 255, 0));
            UIManager.put("TabbedPane.foreground", new Color(0, 0, 0));
            UIManager.put("JTabbedPane.font", new Font("Dialog", Font.ITALIC, 12));
            UIManager.put("TabbedPane.selected", new Color(255, 0, 0));
            UIManager.put("disable", new Color(255, 0, 0));
            UIManager.put("TabbedPane.selectHighlight" , new Color(0, 0, 0));
            UIManager.put("TabbedPane.background",  new Color(0, 0, 0));
            SwingUtilities.updateComponentTreeUI(tabbedPane);*/
            tabbedPane.setTitleAt(2, "<html><font color="
                    + (tabbedPane.isEnabledAt(2) ? "black" : "red") + ">"
                    + tabbedPane.getTitleAt(2) + "</font></html>");
            tabbedPane.setTabPlacement(JTabbedPane.LEFT);
        }
    
        public static void main(String args[]) {
            TestTabbedPane frame = new TestTabbedPane();
            frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I create a Popup balloon like you would see from Windows Messenger
Basically just looking to see if you can capture an image from the webcam
I have some really funky code. As you can see from the code below
My stored procedure runs fine from sql studio as you can see from below
Please look at the image below !! So in this image... You can see
I am using tiny MCE as editor. As you can see in image below
As you can see this is a question from a non web developer. I
How can I remove the animation from this jQuery modal window? You can see
While HTML Scraping is pretty well-documented from what I can see, and I understand
From a security perspective, I can see simply doing an 'eval' on incoming JSON

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.