Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I was wondering is it possible to add a window to another window? Like can you add that window, like an internal frame to another window. The reason why I am asking this is because I want the image window (which is produced by ImageJ) to be displayed in a desktop frame or window. Also how would you go about doing this. Thanks in advance.
You can call the getContentPane() method of a JFrame, or more generally the getComponents() method of Container (e.g., in the case of java.awt.Frame or java.awt.Dialog windows) and then set it as the content pane of a JInternalFrame.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm using Java Netbeans to develop my display software like this: original display, but when i set fullscreen display to: maximize display that's object content (picture, text, button, panel, etc.) size didn't change.
I've found the methode to image scaling, but it's manually that's object (not all of the object in entire JFrame). There is any easier way to change all of my object content to resize automatically in Java Neatbeans?
Thanks...
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am using JPopup menu to implement an autocomplete model in java. everything works fine but the problem is when showing a lot of data that could be irritating. How could I implement arrows for up and down and limit the number of items to let's say to 5?
Is there any better approach for autocomplete model?
You essentially want what a JComboBox does. See BasicComboPopup What you would basically do is wrap your popup in a JScrollPane
Check out Darryl's Menu Scroller.
It has a few features you can customize:
the number of items to display
fixed items at the top/bottom
scrolling speed
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
enter image description here
I want to switch between top components taps using code without need to click the tab
I have three top components, two of them are "editor" top component
an the third is explorer top component
when I do some thing in the third i want to control which of the two "editor" be viewed (selected)
I'm using Netbeans Platform.
For JTabbedPane you can switch tabs by calling setSeldctedTab()
See the Javadoc
So, based on the selected element in your "explorer" component you could use a CardLayout to switch the view (to the correct editor).
See How to Use CardLayout for more details
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm trying to place some images on a JPanel and make them "relocatable" so I can click on one of the images and move to somewhere else on the JPanel while holding the button. It works fine with one image but I just can't come up with a solution for more images than one. I have checked many examples and tried many different ways. If you have any idea please share with me. Thanks!
It works fine with one image but I just can't come up with a solution for more images than one.
You can use the Component Mover. You register the component with the class and then you can move any component.
Or if you don't need the full features of the ComponentMover class you can just use the basic listener for dragging a component.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
my snapshot http://postimg.org/image/fi1bwpfoz/ : how can make similar like menu bar as shown in snapshot. is there any solution for that.
A JMenuBar is just a swing component, so you can change the layout as needed to center it. This post shows an example of how to do it http://java-demos.blogspot.com/2013/11/how-to-place-jmenu-at-center-of-jmenubar.html. You could do the same thing on an internal frame as well.