Popup Menus and the Mac OS

Today I was evaluating a demo that someone had graciously submitted for the tutorial. This demo features a good use of a popup menu but, for some reason, it wasn't working on my Mac. Here is a snippet of code from the demo. Can you see what's wrong? /\*\* \* Selects the closest path on a right click and bring up the operations menu. \*/ private MouseAdapter treeMenuClicked = new MouseAdapter(){ /\*\* \* @see...

Wednesday, September 26, 2007 | Java | Read More

Java SE Tutorials Update

Today we have pushed an updated version of the Java SE Tutorials to the web. This update primarily focuses on bringing the Swing portion of the tutorial to JDK 6. This is now 95% complete. There are too many pages to list each one, but the notable changes include: Performing Custom Painting, a complete re-write How to Print Text, a new page Laying Out Components Within a Container, an updated lesson How to Use Icons, with an updated demo by reader Collin Fagan. The last version...

Wednesday, August 1, 2007 | Java | Read More

Reworking the IconDemo

During the JavaSE 6 update to the Swing Tutorial, a decision was taken to convert a number of the old applets to stand-alone applications. We also converted the majority of them to NetBeans projects. I got to convert the IconDemoApplet. It used to look like this: «IconDemoApplet» I changed it into the IconDemo application, which now looks like this: «IconDemoApp» The IconDemo is now launched with Java™ Web Start—just click the “Launch” button below (you may need to download JDK 6)....

Friday, July 13, 2007 | Java | Read More

Layout Management: Use an IDE or Code by Hand?

Have you seen this cool video about the frustrations of coding a GridBag layout manager? We on the Swing tutorial team think this is a pretty accurate portrayal of how frustrating hand-coding a GUI can be, which is why in the latest update of the Swing trails we've decide to encourage the use of NetBeans as much as possible, especially where layout management is concerned. So, do you agree with this approach? Have you used NetBeans, or any other IDE, to create GUIs, and if...

Tuesday, June 12, 2007 | Java | Read More

Chat, Anyone?

One of our readers posted a suggestion about including a chat applet (or something similar) into the pages of the tutorial. We are considering this possibility but would like to know what everyone else thinks. If we enable a live chat, would you use it? -- Scott Hommel

Friday, June 8, 2007 | Java | Read More

Knowing the Audience

So my latest assignment is to update the custom painting section of the Swing tutorial. The version that's currently online is really a combination of two separate topics: custom painting, and guidelines for creating custom components. A while back I had posted a proposed outline to this blog about how to update that lesson. It sparked some discussion between myself and the Swing engineering team, resulting in a decision to break the material up even more into two separate...

Tuesday, June 5, 2007 | Java | Read More

Visit the Oracle Blog


Contact Us


Integrated Cloud Applications & Platform Services