The Java Tutorials' Weblog

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 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 13, 2009

Watching A Directory for Changes — File Change Notification in NIO.2

The NIO.2 API can be used to write a program that watches a file or directory and notifies the application when the file has changed.[Read More]
pageicon Thursday Apr 02, 2009

Deployment Toolkit 101

The Deployment Toolkit is a set of JavaScript functions that can help developers easily deploy rich internet applications. [Read More]
pageicon Wednesday Apr 01, 2009

Converting Pre-JDK7 File I/O Code

Prior to JDK7, the java.io.File class was the mechanism used for file I/O, but it had several drawbacks. Perhaps you have legacy code that uses java.io.File and would like to take advantage of the java.nio.file.Path functionality with minimal impact on your code.[Read More]
pageicon Tuesday Mar 31, 2009

Deploying An Applet In Under 10 Minutes

Want to learn how to quickly deploy a Java applet?[Read More]
pageicon Friday Mar 27, 2009

PathMatcher in NIO.2

In my last blog entry I show how to walk a file tree using a FileVisitor in a very simple Find example. Alan Bateman (the NIO.2 czar) suggested that, rather than use java.lang.String to match the file, I use the new PathMatcher API. [Read More]
pageicon Tuesday Mar 24, 2009

Traversing a file tree in NIO.2

Have you downloaded JDK7 and played with NIO.2 yet? NIO.2 offers many new I/O features, particularly in the area of files and file system APIs. [Read More]
pageicon Monday Feb 02, 2009

NIO and JDK7

You may be familiar with the NIO (New I/O) api. This API, introduced in release 1.4, extended the previous I/O package and included support for pattern matching with Regular Expressions, Buffer support for primitive types, Character-set encoders and decoders, and Channels — an abstraction for devices capable of performing I/O operations (to name just some of the functionality).

You may be familiar with NIO, but have you heard of NIO.2? NIO.2, part of the JDK7 effort, completes some of the work begun in the NIO api and goes much further: It includes an improved filesystem interface, multicast support, asynchronous I/O support, and complete socket-channel functionality (which was begun in release 1.4).

Thanks to OpenJDK, you can download and play with NIO.2 now. The NIO Project Page contains links to the latest binaries, javadoc, JSR 203, and links to bloggers involved in this effort.

-- Sharon Zakhour

pageicon Tuesday Jan 06, 2009

JavaFX Rated as Top 10 for 2008

As you know, JavaFX 1.0 was released in early December and has been receiving some exciting attention among developers and the press. For example, eweek has ranked JavaFX as number 5 in its Top 10 Application Development Products for 2008.

If you haven't yet checked it out, I would refer you to the last several entries on this blog. :)

Also, if you would like to run JavaFX applications and applets while not connected to the internet, check out this article by Thomas Ng.

Happy 2009!!

-- Sharon Zakhour


« November 2009
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
29
30
     
       
Today

Feeds

Search this blog

Links

Weblog menu

Today's referrers

Today's Page Hits: 337