I'm trying to get my feet wet in Swing, but haven't any luck so far. My
background in reguards to Java is TextMode... I'm very weak in the AWT and especially Swing. Would any of you happen to have some NetRexx/Swing applications that I can have a look at? Simple stuff is best <G>... It'd give me something to disect... I'm running in JDK117 (1.2 isn't GA for OS/2 yet) and about any version of swing... Thanks in advance. -- /--------------------\ | Jerry McBride | | [hidden email] | \--------------------/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
All of VisualNetRexx is written in Swing. I can send you the source w/ the
latest build if you like.... dIon To: [hidden email] cc: (bcc: dIon Gillard/Multitask Consulting/AU) Subject NetRexx Swing examples/samples? : I'm trying to get my feet wet in Swing, but haven't any luck so far. My background in reguards to Java is TextMode... I'm very weak in the AWT and especially Swing. Would any of you happen to have some NetRexx/Swing applications that I can have a look at? Simple stuff is best <G>... It'd give me something to disect... I'm running in JDK117 (1.2 isn't GA for OS/2 yet) and about any version of swing... Thanks in advance. -- /--------------------\ | Jerry McBride | | [hidden email] | \--------------------/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
In reply to this post by mcbrides
Here is a quick and dirty Swing app to display a Netscape LDAP directory as
a JTree in a scrollpane. It only worked for small trees, but maybe it will give you some ideas... Note that it uses the Netscape LDAP developer kit (LJDK) rather than JNDI to issue the LDAP commands: import javax.swing. import netscape.ldap. import com.sun.java.swing.plaf.windows. class LDAPtree1 extends Frame directory=LDAPConnection rootdn=String "o=wa.gov" rootnode=LDAPtreenode method LDAPtree1(s=String) super(s) method init addWindowListener(Winclose()) UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel ") p1 = JPanel() p1.setLayout(GridLayout(2,2)) iplabel=JLabel("Server address:") p1.add(iplabel) ip=JTextField("111.111.111.111",30) p1.add(ip) portlabel=JLabel("Port Number:") p1.add(portlabel) port=JTextField("111",30) p1.add(port) add(p1,BorderLayout.NORTH) directory=LDAPConnection() -- create LDAP interface object directory.connect(ip.getText,port.getText) -- connect to LDAP directory tree = settree sp = JScrollPane() sp.getViewport().add(tree) add(sp,BorderLayout.CENTER) pack() method main(args=String[]) public static lt = LDAPtree1("LDAP Directory Tree") lt.init lt.setsize(500,500) lt.show method settree returns JTree signals LDAPException rootnode = LDAPtreenode(directory.read(rootdn)) addchildren(rootnode) return JTree(rootnode) method addchildren(parent=LDAPtreenode) signals LDAPException LDAPguy=LDAPEntry parent.getUserObject LDAPdn=String LDAPguy.getDN filter=String "(objectclass=*)" result = LDAPSearchResults directory.search(LDAPdn,LDAPv2.SCOPE_ONE,filter,null,0) loop while result.hasMoreElements child = LDAPtreenode(result.next) say child.tostring addchildren(child) parent.add(child) end class LDAPtree1.LDAPtreenode extends DefaultMutableTreeNode method LDAPtreenode(o=Object) super(o) method toString() returns String le = LDAPEntry this.getUserObject return le.getDN class LDAPtree1.Winclose extends WindowAdapter method windowClosing(e=WindowEvent) System.exit(0) > -----Original Message----- > From: [hidden email] [SMTP:[hidden email]] > Sent: Friday, February 26, 1999 4:06 PM > To: [hidden email] > Subject: NetRexx Swing examples/samples? > > I'm trying to get my feet wet in Swing, but haven't any luck so far. My > background in reguards to Java is TextMode... I'm very weak in the AWT and > especially Swing. > > Would any of you happen to have some NetRexx/Swing applications that I can > have > a look at? Simple stuff is best <G>... It'd give me something to disect... > > I'm running in JDK117 (1.2 isn't GA for OS/2 yet) and about any version of > swing... > > Thanks in advance. > > -- > > /--------------------\ > | Jerry McBride | > | [hidden email] | > \--------------------/ > To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
Free forum by Nabble | Edit this page |