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 250895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:32:57+00:00 2026-05-11T21:32:57+00:00

Background information: I am implementing a visual diagram editor, which consists of different complex

  • 0

Background information:

I am implementing a visual diagram editor, which consists of

  • different complex elements (re-sizable, with title bar, sub-elements) and
  • different simple elements (not re-sizable, no title bar, no sub-elements).

All elements are draggable.

I am using JInternalFrame (for complex elements) along with JPanel
(for simple elements) to represent elements of a schematic diagram. There is a container (either a JDesktopPane or a JLayeredPane), which contain
all these elements.

I have several problems with this concept:

Case 1 – The container is a JDesktopPane:

  • JInternalFrames are always above other elements.
  • Clicking other elements don’t “deactivate” previously active JInternalFrame

Case 2 – The container is a JLayeredPane:

  • After clicking some elements inside a JInternalFrame, it stays
    “activated” forever.

Case 3 – JInternalFrame used for everything, but without decoration for simple elements:

  • My custom border (which is needed when I manually remove
    JInternalFrame’s title bar)
    is every time replaced by current LAF border, after
    activating/deactivating the JInternalFrame.

I don’t get the whole concepts behind activating JInternalFrames anyway.
If I could make a JInternalFrame not activable at all, I could
choose Case 2 any would be happy.

Please advice me, what would be an simple and straightforward solution to given problems.

NOTE: Selection of components and activation of JInternalFrame
seem to be different things.

  • 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-11T21:32:58+00:00Added an answer on May 11, 2026 at 9:32 pm

    I might misunderstand your problem. Have you tried to look at the setSelected() method of JIF? It seems there are support for method override and vetoable activation events.

    Edit: Maybe we have some terminological misunderstanding as the javadoc states:

    /**
     * Selects or deselects the internal frame
     * if it's showing.
     * A <code>JInternalFrame</code> normally draws its title bar
     * differently if it is
     * the selected frame, which indicates to the user that this
     * internal frame has the focus.
     * When this method changes the state of the internal frame
     * from deselected to selected, it fires an
     * <code>InternalFrameEvent.INTERNAL_FRAME_ACTIVATED</code> event.
     * If the change is from selected to deselected,
     * an <code>InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED</code> event
     * is fired.
     *
     * @param selected  a boolean, where <code>true</code> means this internal frame
     *                  should become selected (currently active)
     *                  and <code>false</code> means it should become deselected
     * @exception PropertyVetoException when the attempt to set the
     *            property is vetoed by the <code>JInternalFrame</code>
     *
     * @see #isShowing
     * @see InternalFrameEvent#INTERNAL_FRAME_ACTIVATED
     * @see InternalFrameEvent#INTERNAL_FRAME_DEACTIVATED
     *
     * @beaninfo
     *     constrained: true
     *           bound: true
     *     description: Indicates whether this internal frame is currently
     *                  the active frame.
     */
    

    Edit 2: Now I re-read your 2nd case. I would say each JIF has its own separated focus/selection environment. You could create a method which traverses all your JIFs and deselects anything in it unless its the component you wanted to be selected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 200k
  • Answers 200k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As far as I know xVal used to provice a… May 12, 2026 at 8:01 pm
  • Editorial Team
    Editorial Team added an answer You have several options you already discarded: server side integration… May 12, 2026 at 8:01 pm
  • Editorial Team
    Editorial Team added an answer The website wotsit.org has specifications and descriptions of file formats.… May 12, 2026 at 8:01 pm

Related Questions

I am looking for a toolkit that will allow me to design widgets containing
the question I am having is: when running my app with a launch code
First of all, i am new to this topic, and after gathering a lot
I found that Wix v3 uses a tool (heat.exe) to harvest information into WiX

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.