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

  • SEARCH
  • Home
  • 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 6374869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:32:32+00:00 2026-05-25T01:32:32+00:00

I had a real weird method which is used to hide JInternalFrame ‘s title

  • 0

I had a real weird method which is used to hide JInternalFrame‘s title bar. Now the dilemma is below method works on windows platform,

((javax.swing.plaf.basic.BasicInternalFrameUI) aXInternalFrame.getUI()).setNorthPane(null);

But not on Macintosh! Any experts have any idea which can explain internal process which makes this method not usable on Mac.

And is there any method which may work on both platform to hide titlebar of JInternalFrame?

Thanks

  • 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-25T01:32:33+00:00Added an answer on May 25, 2026 at 1:32 am

    On Mac OS X, an instance of com.apple.laf.AquaInternalFrameUI defines the appearance of internal frames. You can minimize the disparity by setting the isPalette property and disabling the frame icons on Mac OS X specifically, as shown below.

    enter image description here

    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.EventQueue;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JButton;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    import javax.swing.plaf.basic.BasicInternalFrameUI;
    
    /** @see http://stackoverflow.com/questions/7218971 */
    public class InternalFrame {
    
        private static final int DELTA = 40;
        private JDesktopPane desktop = new JDesktopPane();
        private int offset = DELTA;
    
        public InternalFrame() {
            JFrame f = new JFrame("Add Frame");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setPreferredSize(new Dimension(400, 400));
            JPanel p = new JPanel();
            p.add(new JButton(new AbstractAction("Add") {
    
                @Override
                public void actionPerformed(ActionEvent e) {
                    createInternalFrame();
                }
            }));
            f.add(p, BorderLayout.SOUTH);
            createInternalFrame();
            f.add(desktop, BorderLayout.CENTER);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        }
    
        private void createInternalFrame() {
            JInternalFrame internalFrame = new JInternalFrame(
                "Internal Frame");//, true, true, true, true);
            desktop.add(internalFrame);
            internalFrame.setLocation(offset, offset);
            offset += DELTA;
            if (System.getProperty("os.name").startsWith("Mac OS")) {
                internalFrame.putClientProperty("JInternalFrame.isPalette", true);
            } else {
                ((BasicInternalFrameUI) internalFrame.getUI()).setNorthPane(null);
            }
            internalFrame.add(createTabbedPane());
            internalFrame.pack();
            internalFrame.setVisible(true);
        }
    
        // take up some space
        private JTabbedPane createTabbedPane() {
            JTabbedPane jtp = new JTabbedPane();
            createTab(jtp, "One");
            createTab(jtp, "Two");
            return jtp;
        }
    
        private void createTab(JTabbedPane jtp, String s) {
            jtp.add(s, new JLabel("TabbedPane " + s, JLabel.CENTER));
        }
    
        public static void main(String args[]) {
            EventQueue.invokeLater(new Runnable() {
    
                @Override
                public void run() {
                    InternalFrame myInternalFrame = new InternalFrame();
                }
            });
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone had any experience in building a 'real world' application with the Smart
I had asked a question on how to implement real time updates in ASP.NET
What is the real reason for that limitation? Is it just work that had
I had used Server Explorer and related tools for graphical database development with Microsoft
Have you had any real use case for using the calling convention fastcall? Thanks.
I have had a real nightmare with Server.MapPath() . When I call Server.MapPath(~) in
We have been using sql server 2005 during development and have had no real
I've had no real luck getting a concise answer for this comparison by using
Have you ever had to use bit shifting in real programming projects? Most (if
I've had a fair search of some help, but I'm having a real load

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.