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...
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...
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...
Ok, hope someone can help me with this one, I'm totally stuck. The whole problem is very strange:
I have two domains on one server that both contain the same dynamic jnlp file and the same .jar file that is run using the jnlp (that is; copies of the same .jnlp and .jar in two different...
I have a Graphics2D object that has a clip set. If I do a System.out.println(g2d.getClip()) I get this:
java.awt.geom.Rectangle2D$Float[x=0.0,y=0.0,w=594.0,h=841.0]
The graphics object is also scaled.
The image I am drawing using g2d.drawImage(image,x,y,this) is larger than the clip.
I...
I have an application that is signed using a valid certificate from Verisign.
Most users are able to run my application.
However, one of the users sent me a screenshot of a dialog with the following text:
"Security Warning
Warning: failed to verify the authenticity of this certificate...
I have a problem with internationalization.
My program consist of a Swing GUI client which recieves input from the user, a servlet running on Tomcat and a MySQL database.
When I send text from the client I encode it using URLEncoder.encode("text", "UTF-8").
The problem is...
On http://www.apple.com/java/ they state:
The Java 1.4.1 Update 1, now available from software update, improves stability, memory usage, and correctness. Requires
Mac OS X v10.2.6 or later.
Following the link one is directed to:
http://www.apple.com/macosx/upgrade/softwareupdates.html...
I'm trying to use Xerces in an unsigned applet. I know it should be possible, but I get an AccessControlException:
try {
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
treemodel = new XMLTreeModel( new...
I'm developing a mail tool for a site which as aprox. 30,000 registered users. I want to be able to send e-mail to them all, fast.
Any good methods? Components? I'd rather just code it, instead of using a third party component .. if that is possible ..
The site is running Apache/1.3.20 Sun...
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.