The Java Tutorials' Weblog

pageicon Tuesday Jan 12, 2010

Java Tutorial Update

We have just pushed an updated version of the Java Tutorial to the web to coincide with the release of Java 6 Update 18.

This update to the tutorial features some additions and an update to the Deployment trail:

  • Developing Draggable Applets – a new topic describing how to create an applet that can be dragged outside of a browser and dynamically converted into a Java Web Start application.
  • Sending Messages to Other Applets has been rewritten.
  • Deploying Without the Codebase Attribute – a new section describing how to use functions in the Deployment Toolkit script to develop and test Java Web Start applications without specifying the codebase attribute in the application's Java Network Launch Protocol (JNLP) file. The ability to deploy and launch Java Web Start applications without specifying the codebase attribute is introduced in the Java SE 6 Update 18 release.
Also, we previously reported that some of the Swing examples would not open under NetBeans 6.5 or later, unless the project.xml file was patched. This problem is fixed.

Thanks, as always, for your feedback.

- Sharon Zakhour

pageicon Wednesday Nov 25, 2009

Java Applets Quiz

Do you enjoy quizzes? Take a minute to answer this quiz about Java applets.[Read More]
pageicon Tuesday Nov 24, 2009

Getting Applets To Talk To Each Other

Do you have more than one applet on a web page? Do you want the applets to share water cooler gossip? Ahem..ahem.. On a more serious note, do you want one applet to invoke methods or set variables of another applet? [Read More]
pageicon Tuesday Nov 17, 2009

Reader Poll: Who Wants Screencasts?

Hi everyone,

We're running a reader poll over on the JavaFX blog. We'd like to know your thoughts on screencasting vs. written tutorials. Please take a minute to visit that page and leave a comment. We greatly value your opinion!

- Scott Hommel

pageicon Friday Nov 13, 2009

Re-spin Your Desktop Application Into A Java Web Start Application

Do you have a desktop application that you'd like to distribute to a wider audience? How about monetizing your application by showcasing it on the Java Store? Check out our screencast!

[Read More]
pageicon Wednesday Nov 11, 2009

NetBeans and the Swing Examples in The Java Tutorial

Several years ago we converted the 100+ examples in the Swing Tutorial to NetBeans projects. We have received several reports of people having trouble opening those NetBeans projects and we have learned that, as of NetBeans 6.5, a tag is now required in the project.xml file, even if that tag is empty.

We are working on updating those examples but, until that happens, you have to manually add the following tag to your project.xml file, before the </data> tag:

<test-roots/>

For example, the corrected project.xml file for the TableFilterDemoProject example would read:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.java.j2seproject</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
            <name>TableFilterDemo</name>
            <minimum-ant-version>1.6.5</minimum-ant-version>
            <source-roots>
                <root id="src.dir"/>
            </source-roots>
            <test-roots/> <!-- ADDED -->
        </data>
    </configuration>
</project>

Thanks for your patience until we fix this problem and thanks, as always, for reading the Java Tutorials.

-- Sharon Zakhour

pageicon Monday Oct 12, 2009

Update -- Mixing Heavyweight and Lightweight Components article

On Sept 23rd, I posted about a new article that describes how you can easily mix heavyweight and lightweight components in 6u12 and JDK7. The calculator example included with the article tickled a known bug on some systems.

The example has now been updated with the recommended workaround. Also, the text of the article calls out the workaround (see the first bullet under the Requirements section).

Thanks, as always, for your feedback!

-- Sharon Zakhour

pageicon Wednesday Sep 30, 2009

Blogs About Developing and Deploying RIAs

Blogs About Developing and Deploying RIAs[Read More]
pageicon Wednesday Sep 23, 2009

Mixing Heavyweight and Lightweight Components

Have you ever tried to put a heavyweight component, such as a java.awt.Button or a java.awt.Label, in a window that has a lightweight component (for example, a javax.swing.JMenu)? Where the menu overlaps the button (or label), the lightweight menu appears underneath the heavyweight component. But, as of 6u12 and JDK7 build 19, this now "just works." For more information, see the new article Mixing Heavyweight and Lightweight Components.

- Sharon Zakhour

pageicon Tuesday Sep 22, 2009

Java Tutorial Update

We have just pushed an updated version of the Java Tutorial to the web. This update features:

Please let us know what you think!

- Sharon Zakhour

pageicon Wednesday Sep 09, 2009

Follow Scott on Twitter!

Hey everyone, this is Scott Hommel. I've been a member of the docs team here at Sun for the past decade, working on both the JDK docs and the Java Tutorial. Since '07 I've been assigned exclusively to JavaFX (http://www.javafx.com). I've set up a twitter account at http://www.twitter.com/scotthommel so if you've ever been curious about the day-to-day workings of a technical writer, sign up to "follow" what I'm working on. It'll give you the inside scoop on what docs are coming out next. With enough followers, perhaps other writers will start "tweeting" as well.

-- Scott Hommel

pageicon Thursday Aug 13, 2009

Translucent and Shaped Windows in JDK7

Learn how to add translucent and shaped windows to your Swing applications.[Read More]
pageicon Saturday Jul 25, 2009

NIO.2 Updates in JDK7

If you are already using the new file I/O API provided in JDK7, you should be aware that there are some minor API changes as of build 64. If you are using the JavaOne Preview release, the changes have not yet been integrated, but they are available now on java.net.

The API is changed as follows:

  • Path.delete(boolean) is now Path.deleteIfExists(). So, delete(true) is equivalent to delete(), and delete(false) is equivalent to deleteIfExists().
  • The time stamp methods in the Attribute class that took long, TimeUnit arguments now take an instance of the new FileTime class. Similarly, the BasicFileAttributes time stamp methods now return an instance of FileTime. The new method signatures are:
    • Attributes.setLastAccessTime(FileRef, FileTime)
    • Attributes.setLastModifiedTime(FileRef, FileTime)
    • FileTime creationTime() in BasicFileAttributes
    • FileTime lastAccessTime() in BasicFileAttributes
    • FileTime lastModifiedTime() in BasicFileAttributes
  • The BasicFileAttribute.linkCount() method has been removed.
  • The BasicFileAttribute.resolution() method has been removed.

The File I/O lesson in the Java Tutorials has been updated with the new API.

-- Sharon Zakhour

pageicon Tuesday Jun 02, 2009

Deploying Your Rich Internet Application Nice And Easy!

Learn techniques to deploy rich internet applications that start up quickly and run consistently in all environments. This blog is based (mostly) on Thomas Ng's Java One Presentation - "Deploying Java Technologies To The Masses".[Read More]
pageicon Wednesday May 27, 2009

Just released -- Java Tutorials update

To coincide with the JDK7 Preview Release and JavaOne, we have just published an updated version of the Java Tutorials. Besides fixing many typos and errors that you have reported, this release includes:

  • An entirely reworked File I/O lesson, featuring NIO.2. This functionality is part of JDK7, which is available now through the Open JDK project on java.net.
  • A new specialized trail covering Sockets Direct Protocol, also new in JDK7.
  • A new facility for gathering feedback about the tutorial. At the bottom of each tutorial page, under the "Discuss" heading, you can leave a publicly viewable, blog-style comment. Let us know what you think about the inclusion of this JS-Kit mechanism.

Thanks, as always, for your feedback. It helps us improve the tutorial!

-- Sharon Zakhour


« February 2010
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
      
       
Today

Feeds

Search this blog

Links

Weblog menu

Today's referrers

Today's Page Hits: 65