Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I have a program with the main JFrame and a JDialog.
Is there any way to make possible move JToolBar between different jPanels,JFrame,JDialor or any other container?
I don't think this is possible.
After digging around the BasicToolBarUI source, when the toolbar is "floated" from it's original window, a reference to the original parent is maintained (dockingSource). When the toolbar is "dropped" into a frame, this is compared and only an instance of dockingSource is accepted as a valid drop target
The only solution that might work in this case would be to create your own UI delegate and override the functionality of the floating process. This is a lot of work, as you would need to, conceivably, provide a delegate for each possible platform...
The only other choice would be to physically remove and add the toolbar manually
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I already found that I can specify the font colour for comments using hi Comment in my color scheme file. This also works perfectly fine for normal // line comments and /* block comments */.
However, my JavaDoc comments look like this:
How can I change the font colour of Method that does stuff, #param and parameter, respectively?
I’ve got this line in my vimrc to disable javadoc highlighting entirely:
" Do NOT highlight javadoc specially: it is distracting
let java_ignore_javadoc = 1
If you want to customize them, you should find out the syntax groups they are using and highlight those. (My synstax plugin, alongside many others, can assist you in this.)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I want to add a listener to buttons of TwinColSelect of Vaadin.
I want to show a form and get information from user before sending the selected item to right column.
That's not possible with the TwinColSelect component.
It would be relatively simple to simulate your own TwinColSelect component as a server-side component with two ListSelect components and the appropriate buttons, and implementing your own button handling logic.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Struggling drawing this out trying to derive the graphic it would create. Some help would be appreciated. Thanks to anyone that comments or helps, I'm stumped.
marker.forward(120);
marker.turnRight(45);
marker.forward(80);
market.turnLeft(90);
marker.forward(80);
marker.turnLeft(90);
marker.forward(80);
marker.turnLeft(90);
marker.forward(80);
Your shape should look somthing like that:
It may look a little bit diffrent it is not the original size and I also draw it in paint.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm making some kind of control panel with a real time log.
Real time log supposed to show last 15 logins. If there are more than 15 records, then I want last record to be deleted and the on which occured recently to be show at the top of a list. I will use observer to update log list if login or logout occurs. Should I use Queue array or is it possible to make it with swing? If possible, then how? Thanks in advance.
I thinks you should use this method setVisibleRowCount(int visibleRowCount) in order to Sets the preferred number of rows in the Jlist that can be displayed .
Sure. Make your own Tablemodel, perhaps derived from javax.swing.table.AbstractTableModel
Just make sure your model only ever exposes 15 rows (maybe use a LinkedList<> to hold your log entries).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is it possible to importing a java source code into Jlst? Please tell me how, and ll appreciate an example if possible. Thanks
I'm not I understand what you're trying to do, but can't you load your source file into a collection line-by-line (using BufferedReader.readLine() around a FileReader), and then create the appropriate ListModel ?
I suspect a TextArea may be more appropriate for code, though.
I don't think you want to import it into JList. Text is better presented in JTextArea or JEditorPane. Here is where you can read more about it
http://java.sun.com/docs/books/tutorial/uiswing/components/textarea.html
http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html