Thanks for answering guys!
Yes, I got that part too .. but what I didn't get is why it works with a JButton then? A JButton in the same place would receive the click.
Also, using the InternalFrameActivated() is a good idea, but it won't be an easy solution to implement - since my original app...
Check out the code below. Save it as DesktopTest.java, compile & run - it's pretty straightforward.
It's a desktop with 3 internal frames. One contains a JButton, while two of them contains a custom JComponent that is a black square which turns blue when the mouse is over it.
The problem is -...
This question has been asked a lot in the Java forums, but I have yet to see an solution to this particular problem.
I have a JDesktopPane with two JInternalFrames. One is the 'editor window / working surface' while the other is a toolbar with icons on it.
The idea is that the user may drag...
One of my main problems is how objects that are in use could be edited by the user (eg. Styles). Because the user should be able to choose "OK" og "Cancel" in the dialog where he edits the styles that are in use in the document.
Should I clone() a style before the user edits it? If so, I would...
Thanks for that reply dbleyl :) ..
I'm already using the Composite pattern by GoF, and I'm using JAXB as the layer between the JDBC and the client application.
The reason I would use singelton is to access the same object from several different classes (e.g. if I would like to access the same...
I would like some feedback on the design of this 'Word'-like application:
The application
---------------------
I'm implementing a 'Word' kind of application with Paragraph and Character styles. Character styles inherit information from the paragraph styles they belong to, and paragraph styles...
http://uic.sourceforge.net/
"This product was born out of the frustration of working with Swing GUIs which is anything but easy. Commercial (or free) designers failed to provide a good answer. After you created your first application with UICompiler, you will agree."
- bjorn
I use InputStream.available() when recieving data from server to see if the server responded.
If it is 0, I do not do anything (assume the response was negative)..
But does it wait for the server, or could it give me 0 in a case where the server has not yet responded?
Is it possible?
The problem: I have created a WYSIWYG editor that generates a PDF. The client (Swing) uses a JTextPane and TrueType fonts, and the PDF is generated on the server using PostScript fonts that are equivalent to the TTF fonts.
The problem is that the lines are wrapped differently...
I use this method to notify the document that a style has changed. It works fine for Paragraph Styles - but not for Character Styles.
Character Styles = styles added with doc.setCharacterAttributes(offset, length, s, replace);
Paragraph Styles = styles added with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.