package com.macfaq; import java.awt.*; import java.net.*; import java.beans.*; public class URLBean extends Label { private URL u; static { PropertyEditorManager.registerEditor(URL.class, URLEditor.class); } public URLBean() { try { // all properties must be initialized (non-null) u = new URL("http://sunsite.unc.edu/nywc/"); } catch (MalformedURLException e) { } setText(u.toString()); } public URL getTheUrl() { return u; } public synchronized void setTheUrl(URL u) { this.u = u; setText(u.toString()); } }