Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7148281

[macosx] JTabbedPane tabs with HTML text do not render correctly

    Details

    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      x86
    • OS:
      os_x
    • Verification:
      Verified

      Backports

        Description

        Related NetBeans bug:
        https://www.netbeans.org/bugzilla/show_bug.cgi?id=208500

        Screenshot of the problem:
        http://bugzilla-attachments-208500.netbeans.org/bugzilla/attachment.cgi?id=115808

        NetBeans IDE uses HTML in titles of tabs in the output window to highlight the outputs which are important to the user. On 7u4 on Mac the HTML breaks tabs appearance.

        If possible NetBeans team would like to have this fixed on Java side in 7u4. Otherwise we will need to turn off HTML highlighting of the important output tabs in NetBeans for the users.
        To reproduce the issue run the code:
        ---------------------------------
        import javax.swing.*;

        public class MyTabbedPane {

            public static void main(String[] args) throws Exception {

                SwingUtilities.invokeAndWait(new Runnable() {

                    @Override
                    public void run() {
                        createAndShowGUI();
                    }
                });
            }

            private static void createAndShowGUI() {
                JFrame frame = new JFrame("Test");
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setSize(300, 300);

                JTabbedPane tabbedPane = new JTabbedPane();

                for (int i = 0; i < 4; i++) {
                    String title = "<html><i>Title</i>" + i;
                    tabbedPane.insertTab(title, null, new JPanel(), "tip " + i, i);
                    tabbedPane.setTabComponentAt(i, new JLabel(title));
                }

                frame.getContentPane().add(tabbedPane);
                frame.setVisible(true);
            }
        }
        ---------------------------------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  alexsch Alexander Scherbatiy (Inactive)
                  Reporter:
                  anebuzel Antonín Nebuželský
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: