From: Geoffrey K. <ge...@kn...> - 2004-08-05 22:36:42
|
Cool. Worked for me on GNU/Linux, not on Mac OS X (no frame showed). ;; value of (frameExample) on GNU/Linux - frame displays javax.swing.JFrame [frame1,0,0,32x32,layout=java.awt.BorderLayout,title=DEMO,resizable, normal,defaultCloseOperation=HIDE_ON_CLOSE, rootPane=javax.swing.JRootPane [,0,0,32x32, layout=javax.swing.plaf.metal.MetalRootPaneUI$MetalRootLayout, alignmentX=null,alignmentY=null, border=javax.swing.plaf.metal.MetalBorders$FrameBorder@180f96c, flags=385,maximumSize=,minimumSize=,preferredSize=], rootPaneCheckingEnabled=true] ;; value of (frameExample) on Mac OS X - frame does not display javax.swing.JFrame [frame1,0,22,0x22,layout=java.awt.BorderLayout,title=DEMO,resizable, normal,defaultCloseOperation=HIDE_ON_CLOSE, rootPane=javax.swing.JRootPane [,0,22,0x0,layout=javax.swing.JRootPane$RootLayout, alignmentX=null,alignmentY=null, border=, flags=385,maximumSize=,minimumSize=,preferredSize=], rootPaneCheckingEnabled=true] Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Aug 5, 2004, at 17:03, Ken Anderson wrote: > Here's how to get the jscheme icon to appear on the title bar of a > frame: > > (import "javax.swing.UIManager") > (import "javax.swing.JFrame") > (import "javax.swing.ImageIcon") > (define (frameExample) > (UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName)) > (JFrame.setDefaultLookAndFeelDecorated #t) > (let ((frame (JFrame. "DEMO"))) > (.setIconImage > frame > (.getImage (ImageIcon. > "jscheme/images/jscheme-icon2.gif"))) > (.pack frame) > (.show frame) > frame)) > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source > Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |