Help Needed -

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Help Needed -

Quique Britto
Hi,

I would like to use the Enumearation entries method to hold all the zip
entries in a zip file under netrexx but I don't know how, any help will be
appreciated.

thks


..
snip

-- query the filechooser to get user input
  if returnedval = JFileChooser.APPROVE_OPTION then
    do
      zp = fc.getSelectedFile()
      zf = ZipFile( zp )

       ?

      catch IOException
      say "IO Error - problem opening archive"

    end

..
snip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100113/1dd7aa29/attachment.html
Reply | Threaded
Open this post in threaded view
|

Help Needed -

Rupp Peter - prupp
Hello,

Please excuse me if you've heard this one before....but....has there
been any update on the NetRexx open-source?

Does anybody know what seems to be the issue?  I'm trying to determine
if NetRexx is something I should use (I love Rexx).

BTW, should NetRexx go open-source, what improvements seem to be in the
wings?  I thought it was pretty good on it's own...

Thank you, and kind regards.

Peter

***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.
****************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100113/0cbdbbce/attachment.html
Reply | Threaded
Open this post in threaded view
|

Help Needed -

rvjansen
NetRexx is going through the open source process - there is no reason to doubt the outcome yet, it just takes time. I know what the issue is, and the issue is time, or rather lack of it.

We will discuss future plans as soon as we have set this important step.

There have been some requirements already, to do with adapter classes, and charsequences.

I agree that it does not need to change a whole lot - you should definitely use it.

best regards,

Ren? Jansen.


On 13 jan 2010, at 23:27, Rupp Peter - prupp wrote:

> Hello,
> Please excuse me if you?ve heard this one before?.but?.has there been any update on the NetRexx open-source?
> Does anybody know what seems to be the issue?  I?m trying to determine if NetRexx is something I should use (I love Rexx).
> BTW, should NetRexx go open-source, what improvements seem to be in the wings?  I thought it was pretty good on it?s own?
> Thank you, and kind regards.
> Peter
> ***************************************************************************
> The information contained in this communication is confidential, is
> intended only for the use of the recipient named above, and may be legally
> privileged.
>
> If the reader of this message is not the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited.
>
> If you have received this communication in error, please resend this
> communication to the sender and delete the original message or any copy
> of it from your computer system.
>
> Thank You.
> ****************************************************************************
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100114/f63ce8e0/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

Help Needed -

Kermit Kiser
In reply to this post by Quique Britto
Here is a code segment copied from the jEdit NetRexxScript plugin. The
code uses a jar file but that is just a zip file with a manifest - the
code should be the same, just put Zip in place of Jar:

--    install the setup and sample scripts

        do
            jf=JarFile(getPluginJAR.getFile)
            entries = jf.entries()
            loop while entries.hasMoreElements()              
                je=JarEntry entries.nextElement()
                if Rexx(je.getName).translate(fs,'/').pos('NetRexx'fs)>0
then copyjarentry(jf,je,setdir)
--    another Java "gotcha" - jar entries have unix file separators thus
requiring the translate above                  
                end
            catch err=Exception
                say "NetRexxScript.jar ==>" err
        end

-- Kermit

Quique Britto wrote:

> Hi,
>
> I would like to use the Enumearation entries method to hold all the
> zip entries in a zip file under netrexx but I don't know how, any help
> will be appreciated.
>
> thks
>
>
> ..
> snip
>
> -- query the filechooser to get user input
>   if returnedval = JFileChooser.APPROVE_OPTION then
>     do
>       zp = fc.getSelectedFile()
>       zf = ZipFile( zp )
>
>        ?
>      
>       catch IOException
>       say "IO Error - problem opening archive"
>      
>     end
>
> ..
> snip
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100113/c76306e8/attachment.html
Reply | Threaded
Open this post in threaded view
|

Help Needed -

Thomas.Schneider.Wien
In reply to this post by Rupp Peter - prupp
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100114/c23da063/attachment.html
Tom. (ths@db-123.com)
Reply | Threaded
Open this post in threaded view
|

Help Needed -

Rupp Peter - prupp
Thank you (Rene and Thomas) for the good information.   I really like
the rexx language and especially NetRexx, but was concerned if it would
eventually be decommissioned by IBM (not moved to opensource) then I
would have to scramble to port a lot of code to some other scripting
language (or java itself), which would be a large undertaking.    

 

The only drawback I see with scripting languages is there's little
GUI-based code building tools available.  If you know of any stable
tools that can generate netRexx code, that would be very helpful.

 

Thanks again for taking the time to respond.

Kind regards,

Peter

 

________________________________

From: [hidden email]
[mailto:[hidden email]] On Behalf Of Thomas
Schneider
Sent: Wednesday, January 13, 2010 7:49 PM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Help Needed -

 

Hello Peter,

   I *do know* that Rene Vincent Jansen (in this group) is working on
the 'NetRexx is going OPEN SOURCE' project very hardly. With the Help of
Mike F. Colishaw, of course.

  The major issues seem to be 'legal' ones, BUT:

RENE:

  It might be a GOOD time to say to this group what your time schedules
are nowadays !

Thomas Schneider

www.Rexx2Nrx.com
www.db-123.com

PS: I'm currently busy to make Rexx2Nrx 'open source' as well. As I am
only 1 (repeat 1)
person, it will take some time. But you may start to SUBSCRIBE GOOGLE
GROUP
Rexx2Nrx to get all release details....

Tom.
======================================================================
Rupp Peter - prupp schrieb:

Hello,

Please excuse me if you've heard this one before....but....has there
been any update on the NetRexx open-source?

Does anybody know what seems to be the issue?  I'm trying to determine
if NetRexx is something I should use (I love Rexx).

BTW, should NetRexx go open-source, what improvements seem to be in the
wings?  I thought it was pretty good on it's own...

Thank you, and kind regards.

Peter

************************************************************************
***
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally
privileged.
 
If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.
 
If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.
 
Thank You.
************************************************************************
****
 
 



________________________________



 
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
 
 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100115/eab401b4/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

Help Needed -

Thomas.Schneider.Wien
Hello Peter,
as a first step I suggest you should try Kermit Kiser's NetRexxScript (a
PLUGIN to JEdit).
You#ll find a link on my home-page www.Rexx2Nrx.com.

Kermit for sure will help you to get it running....

I am just making my first tries with NetRexxScript, and it looks promising.
Tom.
====================================================
Rupp Peter - prupp schrieb:

>
> Thank you (Rene and Thomas) for the good information. I really like
> the rexx language and especially NetRexx, but was concerned if it
> would eventually be decommissioned by IBM (not moved to opensource)
> then I would have to scramble to port a lot of code to some other
> scripting language (or java itself), which would be a large undertaking.
>
> The only drawback I see with scripting languages is there?s little
> GUI-based code building tools available. If you know of any stable
> tools that can generate netRexx code, that would be very helpful.
>
> Thanks again for taking the time to respond.
>
> Kind regards,
>
> Peter
>
> ------------------------------------------------------------------------
>
> *From:* [hidden email]
> [mailto:[hidden email]] *On Behalf Of *Thomas
> Schneider
> *Sent:* Wednesday, January 13, 2010 7:49 PM
> *To:* IBM Netrexx
> *Subject:* Re: [Ibm-netrexx] Help Needed -
>
> Hello Peter,
>
> I *do know* that Rene Vincent Jansen (in this group) is working on the
> 'NetRexx is going OPEN SOURCE' project very hardly. With the Help of
> Mike F. Colishaw, of course.
>
> The major issues seem to be 'legal' ones, BUT:
>
> RENE:
>
> It might be a GOOD time to say to this group what your time schedules
> are nowadays !
>
> Thomas Schneider
>
> www.Rexx2Nrx.com <http://www.Rexx2Nrx.com>
> www.db-123.com <http://www.db-123.com>
>
> PS: I'm currently busy to make Rexx2Nrx 'open source' as well. As I am
> only 1 (repeat 1)
> person, it will take some time. But you may start to SUBSCRIBE GOOGLE
> GROUP
> Rexx2Nrx to get all release details....
>
> Tom.
> ======================================================================
> Rupp Peter - prupp schrieb:
>
> Hello,
>
> Please excuse me if you?ve heard this one before?.but?.has there been
> any update on the NetRexx open-source?
>
> Does anybody know what seems to be the issue? I?m trying to determine
> if NetRexx is something I should use (I love Rexx).
>
> BTW, should NetRexx go open-source, what improvements seem to be in
> the wings? I thought it was pretty good on it?s own?
>
> Thank you, and kind regards.
>
> Peter
>
> ***************************************************************************
> The information contained in this communication is confidential, is
> intended only for the use of the recipient named above, and may be legally
> privileged.
>  
> If the reader of this message is not the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited.
>  
> If you have received this communication in error, please resend this
> communication to the sender and delete the original message or any copy
> of it from your computer system.
>  
> Thank You.
> ****************************************************************************
>  
>  
>
>
> ------------------------------------------------------------------------
>
>
>  
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email] <mailto:[hidden email]>
>  
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  

Tom. (ths@db-123.com)
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

britten /Quique Britto (SPAIN VAL Export Mngr AMX)
In reply to this post by Kermit Kiser
Hi,
 
my program will call the OpenAction class when "Open" is selected fm the
jtoolbar or jmenu, a filechooser is shown and filtered to show onlys
zips, the file is selected and entries counted and stored into variable
"i".
 
I need that this amount to be shown in a JLabel called "sb" which has
been created in the parent class, the OpenAction code is below, the
program compiles without error but the jlabel text is not set.
 
 
Any help would be appreciated.
 
Thks
 
 
 
 
..
..
class eZE.OpenAction dependent extends AbstractAction
  method OpenAction( text = String, icon = ImageIcon )  
  super( text, icon )
 
  method actionPerformed( e = ActionEvent ) public
  mainwindow = JFrame()
  sb         = JLabel()
 
  -- load file chooser using filters
  fc = JFileChooser( "c:\\backup\\ecomstation\\programs\\netdrive" ) --
directory for testing purposes only
  fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
  fc.setAcceptAllFileFilterUsed( 0 )
  fc.addChoosableFileFilter( MyFilter() )
 
  -- open file chooser
  returnedval = fc.showOpenDialog( mainwindow )
 
  -- query the filechooser to get user input
  if returnedval = JFileChooser.APPROVE_OPTION then
    do
      zp = fc.getSelectedFile()
      zf = ZipFile( zp )
     
      entries = zf.entries()
     
      -- set counter to hold total entries
      i = 0
     
      loop while entries.hasMoreElements()                
        je = ZipEntry entries.nextElement()
        i = i + 1
      end
     
      catch err=Exception
        say "NetRexxScript.jar ==>" err
    end
  sb.setText( i )
  return
..
..
 
 
 
Quique



DISCLAIMER:
En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos 15/1999, le informamos que sus datos personales estan incorporados a un fichero denominado clientes, con la unica finalidad de mantener relaciones profesionales. Si lo desea puede ejercer los derechos de acceso, rectificacion, cancelacion u oposicion de sus datos personales dirigiendose a: COSCO IBERIA  S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona (08011).
Este mensaje y cualquier documento que lleve adjunto, es confidencial y destinado unicamente a la persona o entidad a quien ha sido enviado. Si Usted ha recibido este mensaje por error, le informamos que el contenido en el mismo es reservado y el uso no autorizado esta prohibido legalmente,por ello,por favor , le rogamos que nos lo notifique al e-mail: [hidden email] o al telefono 93 304 71 26
Si su e-mail no ha podido ser entregado al buzon de su destinatario,  por favor reenvielo a la direccion [hidden email]
If your mail could not be delivered correctly, please resend it to [hidden email]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100118/2e6422af/attachment.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Kermit Kiser
I don't quite understand your code. Isn't the "sb" JLabel in the
actionPerformed method a temporary local variable that vanishes when you
return? How are you displaying it?

britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:

> Hi,
>  
> my program will call the OpenAction class when "Open" is selected fm
> the jtoolbar or jmenu, a filechooser is shown and filtered to show
> onlys zips, the file is selected and entries counted and stored into
> variable "i".
>  
> I need that this amount to be shown in a JLabel called "sb" which has
> been created in the parent class, the OpenAction code is below, the
> program compiles without error but the jlabel text is not set.
>  
>  
> Any help would be appreciated.
>  
> Thks
>  
>  
>  
>  
> ..
> ..
> class eZE.OpenAction dependent extends AbstractAction
>   method OpenAction( text = String, icon = ImageIcon )  
>   super( text, icon )
>  
>   method actionPerformed( e = ActionEvent ) public
>   mainwindow = JFrame()
>   sb         = JLabel()
>  
>   -- load file chooser using filters
>   fc = JFileChooser( "c:\\backup\\ecomstation\\programs\\netdrive" )
> -- directory for testing purposes only
>   fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>   fc.setAcceptAllFileFilterUsed( 0 )
>   fc.addChoosableFileFilter( MyFilter() )
>  
>   -- open file chooser
>   returnedval = fc.showOpenDialog( mainwindow )
>  
>   -- query the filechooser to get user input
>   if returnedval = JFileChooser.APPROVE_OPTION then
>     do
>       zp = fc.getSelectedFile()
>       zf = ZipFile( zp )
>      
>       entries = zf.entries()
>      
>       -- set counter to hold total entries
>       i = 0
>      
>       loop while entries.hasMoreElements()              
>         je = ZipEntry entries.nextElement()
>         i = i + 1
>       end
>      
>       catch err=Exception
>         say "NetRexxScript.jar ==>" err
>     end
>   *sb.setText( i )
> *  return
> ..
> ..
>  
>  
>  
> Quique
>
>
> /DISCLAIMER:
> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de
> Datos 15/1999, le informamos que sus datos personales estan
> incorporados a un fichero denominado clientes, con la unica finalidad
> de mantener relaciones profesionales. Si lo desea puede ejercer los
> derechos de acceso, rectificacion, cancelacion u oposicion de sus
> datos personales dirigiendose a: COSCO IBERIA S.A. -Responsable
> Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona
> (08011). Este mensaje y cualquier documento que lleve adjunto, es
> confidencial y destinado unicamente a la persona o entidad a quien ha
> sido enviado. Si Usted ha recibido este mensaje por error, le
> informamos que el contenido en el mismo es reservado y el uso no
> autorizado esta prohibido legalmente,por ello,por favor , le rogamos
> que nos lo notifique al e-mail: [hidden email] o al telefono
> 93 304 71 26 Si su e-mail no ha podido ser entregado al buzon de su
> destinatario, por favor reenvielo a la direccion
> [hidden email] If your mail could not be delivered correctly,
> please resend it to [hidden email] /
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100118/c791757e/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

britten /Quique Britto (SPAIN VAL Export Mngr AMX)
i want to display the total entries in this Jlbael (sb) before the
return is performed.
 
Cosco Iberia, S.A.
Export Trade Manager
Quique Britto
Tel.: 96-3939103
Fax.: 96-3939119
[hidden email] <blocked::mailto:[hidden email]>
 
Track, trace and monitor your shipments through internet. On
www.coscon.com <http://www.coscon.com/>
 
Office Hours .:
08.30 - 17.30 hrs (Mon/Thu)
08.30 - 14.00 hrs (Fri)
 

________________________________

De: [hidden email]
[mailto:[hidden email]] En nombre de Kermit Kiser
Enviado el: lunes, 18 de enero de 2010 22:01
Para: IBM Netrexx
Asunto: Re: [Ibm-netrexx] JLabel - Setting the text


I don't quite understand your code. Isn't the "sb" JLabel in the
actionPerformed method a temporary local variable that vanishes when you
return? How are you displaying it?

britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:

        Hi,
         
        my program will call the OpenAction class when "Open" is
selected fm the jtoolbar or jmenu, a filechooser is shown and filtered
to show onlys zips, the file is selected and entries counted and stored
into variable "i".
         
        I need that this amount to be shown in a JLabel called "sb"
which has been created in the parent class, the OpenAction code is
below, the program compiles without error but the jlabel text is not
set.
         
         
        Any help would be appreciated.
         
        Thks
         
         
         
         
        ..
        ..
        class eZE.OpenAction dependent extends AbstractAction
          method OpenAction( text = String, icon = ImageIcon )  
          super( text, icon )
         
          method actionPerformed( e = ActionEvent ) public
          mainwindow = JFrame()
          sb         = JLabel()
         
          -- load file chooser using filters
          fc = JFileChooser(
"c:\\backup\\ecomstation\\programs\\netdrive" ) -- directory for testing
purposes only
          fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
          fc.setAcceptAllFileFilterUsed( 0 )
          fc.addChoosableFileFilter( MyFilter() )
         
          -- open file chooser
          returnedval = fc.showOpenDialog( mainwindow )
         
          -- query the filechooser to get user input
          if returnedval = JFileChooser.APPROVE_OPTION then
            do
              zp = fc.getSelectedFile()
              zf = ZipFile( zp )
             
              entries = zf.entries()
             
              -- set counter to hold total entries
              i = 0
             
              loop while entries.hasMoreElements()                
                je = ZipEntry entries.nextElement()
                i = i + 1
              end
             
              catch err=Exception
                say "NetRexxScript.jar ==>" err
            end
          sb.setText( i )
          return
        ..
        ..
         
         
         
        Quique

       
       

        DISCLAIMER:
        En cumplimiento del articulo 5 de la Ley Organica de Proteccion
de Datos 15/1999, le informamos que sus datos personales estan
incorporados a un fichero denominado clientes, con la unica finalidad de
mantener relaciones profesionales. Si lo desea puede ejercer los
derechos de acceso, rectificacion, cancelacion u oposicion de sus datos
personales dirigiendose a: COSCO IBERIA S.A. -Responsable Proteccion de
Datos- calle Casanova, 2, 6a planta de Barcelona (08011). Este mensaje y
cualquier documento que lleve adjunto, es confidencial y destinado
unicamente a la persona o entidad a quien ha sido enviado. Si Usted ha
recibido este mensaje por error, le informamos que el contenido en el
mismo es reservado y el uso no autorizado esta prohibido legalmente,por
ello,por favor , le rogamos que nos lo notifique al e-mail:
[hidden email] o al telefono 93 304 71 26 Si su e-mail no ha
podido ser entregado al buzon de su destinatario, por favor reenvielo a
la direccion [hidden email] If your mail could not be delivered
correctly, please resend it to [hidden email]
       
________________________________


        _______________________________________________
        Ibm-netrexx mailing list
        [hidden email]
       
         




DISCLAIMER:
En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos 15/1999, le informamos que sus datos personales estan incorporados a un fichero denominado clientes, con la unica finalidad de mantener relaciones profesionales. Si lo desea puede ejercer los derechos de acceso, rectificacion, cancelacion u oposicion de sus datos personales dirigiendose a: COSCO IBERIA  S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona (08011).
Este mensaje y cualquier documento que lleve adjunto, es confidencial y destinado unicamente a la persona o entidad a quien ha sido enviado. Si Usted ha recibido este mensaje por error, le informamos que el contenido en el mismo es reservado y el uso no autorizado esta prohibido legalmente,por ello,por favor , le rogamos que nos lo notifique al e-mail: [hidden email] o al telefono 93 304 71 26
Si su e-mail no ha podido ser entregado al buzon de su destinatario,  por favor reenvielo a la direccion [hidden email]
If your mail could not be delivered correctly, please resend it to [hidden email]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/f5ce49fa/attachment.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Kermit Kiser
Ah. Perhaps:

 mainwindow.add(sb);mainwindow.show

would do it?

britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:

> i want to display the total entries in this Jlbael (sb) before the
> return is performed.
>  
> Cosco Iberia, S.A.
> Export Trade Manager
> Quique Britto
> Tel.: 96-3939103
> Fax.: 96-3939119
> [hidden email] <blocked::mailto:[hidden email]>
>  
> Track, trace and monitor your shipments through internet. On
> www.coscon.com <http://www.coscon.com/>
>  
> Office Hours .:
> 08.30 - 17.30 hrs (Mon/Thu)
> 08.30 - 14.00 hrs (Fri)
>  
>
> ------------------------------------------------------------------------
> *De:* [hidden email]
> [mailto:[hidden email]] *En nombre de *Kermit Kiser
> *Enviado el:* lunes, 18 de enero de 2010 22:01
> *Para:* IBM Netrexx
> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>
> I don't quite understand your code. Isn't the "sb" JLabel in the
> actionPerformed method a temporary local variable that vanishes when
> you return? How are you displaying it?
>
> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>> Hi,
>>  
>> my program will call the OpenAction class when "Open" is selected fm
>> the jtoolbar or jmenu, a filechooser is shown and filtered to show
>> onlys zips, the file is selected and entries counted and stored into
>> variable "i".
>>  
>> I need that this amount to be shown in a JLabel called "sb" which has
>> been created in the parent class, the OpenAction code is below, the
>> program compiles without error but the jlabel text is not set.
>>  
>>  
>> Any help would be appreciated.
>>  
>> Thks
>>  
>>  
>>  
>>  
>> ..
>> ..
>> class eZE.OpenAction dependent extends AbstractAction
>>   method OpenAction( text = String, icon = ImageIcon )  
>>   super( text, icon )
>>  
>>   method actionPerformed( e = ActionEvent ) public
>>   mainwindow = JFrame()
>>   sb         = JLabel()
>>  
>>   -- load file chooser using filters
>>   fc = JFileChooser( "c:\\backup\\ecomstation\\programs\\netdrive" )
>> -- directory for testing purposes only
>>   fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>>   fc.setAcceptAllFileFilterUsed( 0 )
>>   fc.addChoosableFileFilter( MyFilter() )
>>  
>>   -- open file chooser
>>   returnedval = fc.showOpenDialog( mainwindow )
>>  
>>   -- query the filechooser to get user input
>>   if returnedval = JFileChooser.APPROVE_OPTION then
>>     do
>>       zp = fc.getSelectedFile()
>>       zf = ZipFile( zp )
>>      
>>       entries = zf.entries()
>>      
>>       -- set counter to hold total entries
>>       i = 0
>>      
>>       loop while entries.hasMoreElements()              
>>         je = ZipEntry entries.nextElement()
>>         i = i + 1
>>       end
>>      
>>       catch err=Exception
>>         say "NetRexxScript.jar ==>" err
>>     end
>>   *sb.setText( i )
>> *  return
>> ..
>> ..
>>  
>>  
>>  
>> Quique
>>
>>
>> /DISCLAIMER:
>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de
>> Datos 15/1999, le informamos que sus datos personales estan
>> incorporados a un fichero denominado clientes, con la unica finalidad
>> de mantener relaciones profesionales. Si lo desea puede ejercer los
>> derechos de acceso, rectificacion, cancelacion u oposicion de sus
>> datos personales dirigiendose a: COSCO IBERIA S.A. -Responsable
>> Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona
>> (08011). Este mensaje y cualquier documento que lleve adjunto, es
>> confidencial y destinado unicamente a la persona o entidad a quien ha
>> sido enviado. Si Usted ha recibido este mensaje por error, le
>> informamos que el contenido en el mismo es reservado y el uso no
>> autorizado esta prohibido legalmente,por ello,por favor , le rogamos
>> que nos lo notifique al e-mail: [hidden email] o al telefono
>> 93 304 71 26 Si su e-mail no ha podido ser entregado al buzon de su
>> destinatario, por favor reenvielo a la direccion
>> [hidden email] If your mail could not be delivered correctly,
>> please resend it to [hidden email] /
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>>
>>  
>
>
> /DISCLAIMER:
> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de
> Datos 15/1999, le informamos que sus datos personales estan
> incorporados a un fichero denominado clientes, con la unica finalidad
> de mantener relaciones profesionales. Si lo desea puede ejercer los
> derechos de acceso, rectificacion, cancelacion u oposicion de sus
> datos personales dirigiendose a: COSCO IBERIA S.A. -Responsable
> Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona
> (08011). Este mensaje y cualquier documento que lleve adjunto, es
> confidencial y destinado unicamente a la persona o entidad a quien ha
> sido enviado. Si Usted ha recibido este mensaje por error, le
> informamos que el contenido en el mismo es reservado y el uso no
> autorizado esta prohibido legalmente,por ello,por favor , le rogamos
> que nos lo notifique al e-mail: [hidden email] o al telefono
> 93 304 71 26 Si su e-mail no ha podido ser entregado al buzon de su
> destinatario, por favor reenvielo a la direccion
> [hidden email] If your mail could not be delivered correctly,
> please resend it to [hidden email] /
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/99a25034/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

britten /Quique Britto (SPAIN VAL Export Mngr AMX)
the jlabel already exists and is displayed in the parent class, I just
need to update it's text fm within the Class below.
 
Cosco Iberia, S.A.
Export Trade Manager
Quique Britto
Tel.: 96-3939103
Fax.: 96-3939119
[hidden email] <blocked::mailto:[hidden email]>
 
Track, trace and monitor your shipments through internet. On
www.coscon.com <http://www.coscon.com/>
 
Office Hours .:
08.30 - 17.30 hrs (Mon/Thu)
08.30 - 14.00 hrs (Fri)
 

________________________________

De: [hidden email]
[mailto:[hidden email]] En nombre de Kermit Kiser
Enviado el: martes, 19 de enero de 2010 10:44
Para: IBM Netrexx
Asunto: Re: [Ibm-netrexx] JLabel - Setting the text


Ah. Perhaps:

 mainwindow.add(sb);mainwindow.show

would do it?

britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:

        i want to display the total entries in this Jlbael (sb) before
the return is performed.
         
        Cosco Iberia, S.A.
        Export Trade Manager
        Quique Britto
        Tel.: 96-3939103
        Fax.: 96-3939119
        [hidden email]
<blocked::mailto:[hidden email]>
         
        Track, trace and monitor your shipments through internet. On
www.coscon.com <http://www.coscon.com/>
         
        Office Hours .:
        08.30 - 17.30 hrs (Mon/Thu)
        08.30 - 14.00 hrs (Fri)
         

________________________________

        De: [hidden email]
[mailto:[hidden email]] En nombre de Kermit Kiser
        Enviado el: lunes, 18 de enero de 2010 22:01
        Para: IBM Netrexx
        Asunto: Re: [Ibm-netrexx] JLabel - Setting the text
       
       
        I don't quite understand your code. Isn't the "sb" JLabel in the
actionPerformed method a temporary local variable that vanishes when you
return? How are you displaying it?
       
        britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:

                Hi,
                 
                my program will call the OpenAction class when "Open" is
selected fm the jtoolbar or jmenu, a filechooser is shown and filtered
to show onlys zips, the file is selected and entries counted and stored
into variable "i".
                 
                I need that this amount to be shown in a JLabel called
"sb" which has been created in the parent class, the OpenAction code is
below, the program compiles without error but the jlabel text is not
set.
                 
                 
                Any help would be appreciated.
                 
                Thks
                 
                 
                 
                 
                ..
                ..
                class eZE.OpenAction dependent extends AbstractAction
                  method OpenAction( text = String, icon = ImageIcon )

                  super( text, icon )
                 
                  method actionPerformed( e = ActionEvent ) public
                  mainwindow = JFrame()
                  sb         = JLabel()
                 
                  -- load file chooser using filters
                  fc = JFileChooser(
"c:\\backup\\ecomstation\\programs\\netdrive" ) -- directory for testing
purposes only
                  fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
                  fc.setAcceptAllFileFilterUsed( 0 )
                  fc.addChoosableFileFilter( MyFilter() )
                 
                  -- open file chooser
                  returnedval = fc.showOpenDialog( mainwindow )
                 
                  -- query the filechooser to get user input
                  if returnedval = JFileChooser.APPROVE_OPTION then
                    do
                      zp = fc.getSelectedFile()
                      zf = ZipFile( zp )
                     
                      entries = zf.entries()
                     
                      -- set counter to hold total entries
                      i = 0
                     
                      loop while entries.hasMoreElements()

                        je = ZipEntry entries.nextElement()
                        i = i + 1
                      end
                     
                      catch err=Exception
                        say "NetRexxScript.jar ==>" err
                    end
                  sb.setText( i )
                  return
                ..
                ..
                 
                 
                 
                Quique

               
               

                DISCLAIMER:
                En cumplimiento del articulo 5 de la Ley Organica de
Proteccion de Datos 15/1999, le informamos que sus datos personales
estan incorporados a un fichero denominado clientes, con la unica
finalidad de mantener relaciones profesionales. Si lo desea puede
ejercer los derechos de acceso, rectificacion, cancelacion u oposicion
de sus datos personales dirigiendose a: COSCO IBERIA S.A. -Responsable
Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona (08011).
Este mensaje y cualquier documento que lleve adjunto, es confidencial y
destinado unicamente a la persona o entidad a quien ha sido enviado. Si
Usted ha recibido este mensaje por error, le informamos que el contenido
en el mismo es reservado y el uso no autorizado esta prohibido
legalmente,por ello,por favor , le rogamos que nos lo notifique al
e-mail: [hidden email] o al telefono 93 304 71 26 Si su e-mail
no ha podido ser entregado al buzon de su destinatario, por favor
reenvielo a la direccion [hidden email] If your mail could not
be delivered correctly, please resend it to [hidden email]
               
________________________________


                _______________________________________________
                Ibm-netrexx mailing list
                [hidden email]
               
                 

       
       

        DISCLAIMER:
        En cumplimiento del articulo 5 de la Ley Organica de Proteccion
de Datos 15/1999, le informamos que sus datos personales estan
incorporados a un fichero denominado clientes, con la unica finalidad de
mantener relaciones profesionales. Si lo desea puede ejercer los
derechos de acceso, rectificacion, cancelacion u oposicion de sus datos
personales dirigiendose a: COSCO IBERIA S.A. -Responsable Proteccion de
Datos- calle Casanova, 2, 6a planta de Barcelona (08011). Este mensaje y
cualquier documento que lleve adjunto, es confidencial y destinado
unicamente a la persona o entidad a quien ha sido enviado. Si Usted ha
recibido este mensaje por error, le informamos que el contenido en el
mismo es reservado y el uso no autorizado esta prohibido legalmente,por
ello,por favor , le rogamos que nos lo notifique al e-mail:
[hidden email] o al telefono 93 304 71 26 Si su e-mail no ha
podido ser entregado al buzon de su destinatario, por favor reenvielo a
la direccion [hidden email] If your mail could not be delivered
correctly, please resend it to [hidden email]
       
________________________________


        _______________________________________________
        Ibm-netrexx mailing list
        [hidden email]
       
         




DISCLAIMER:
En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos 15/1999, le informamos que sus datos personales estan incorporados a un fichero denominado clientes, con la unica finalidad de mantener relaciones profesionales. Si lo desea puede ejercer los derechos de acceso, rectificacion, cancelacion u oposicion de sus datos personales dirigiendose a: COSCO IBERIA  S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona (08011).
Este mensaje y cualquier documento que lleve adjunto, es confidencial y destinado unicamente a la persona o entidad a quien ha sido enviado. Si Usted ha recibido este mensaje por error, le informamos que el contenido en el mismo es reservado y el uso no autorizado esta prohibido legalmente,por ello,por favor , le rogamos que nos lo notifique al e-mail: [hidden email] o al telefono 93 304 71 26
Si su e-mail no ha podido ser entregado al buzon de su destinatario,  por favor reenvielo a la direccion [hidden email]
If your mail could not be delivered correctly, please resend it to [hidden email]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/82e4a061/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Kermit Kiser
This code creates a NEW JLabel (constructor is called) and assigns it to
the sb variable. This new JLabel is not added to any display window, at
least in this code. The JLabel you previously assigned to sb is
unchanged and is no longer assigned to sb but is still in any window it
was added to prior to this code.

britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:

> the jlabel already exists and is displayed in the parent class, I just
> need to update it's text fm within the Class below.
>  
> Cosco Iberia, S.A.
> Export Trade Manager
> Quique Britto
> Tel.: 96-3939103
> Fax.: 96-3939119
> [hidden email] <blocked::mailto:[hidden email]>
>  
> Track, trace and monitor your shipments through internet. On
> www.coscon.com <http://www.coscon.com/>
>  
> Office Hours .:
> 08.30 - 17.30 hrs (Mon/Thu)
> 08.30 - 14.00 hrs (Fri)
>  
>
> ------------------------------------------------------------------------
> *De:* [hidden email]
> [mailto:[hidden email]] *En nombre de *Kermit Kiser
> *Enviado el:* martes, 19 de enero de 2010 10:44
> *Para:* IBM Netrexx
> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>
> Ah. Perhaps:
>
>  mainwindow.add(sb);mainwindow.show
>
> would do it?
>
> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>> i want to display the total entries in this Jlbael (sb) before the
>> return is performed.
>>  
>> Cosco Iberia, S.A.
>> Export Trade Manager
>> Quique Britto
>> Tel.: 96-3939103
>> Fax.: 96-3939119
>> [hidden email] <blocked::mailto:[hidden email]>
>>  
>> Track, trace and monitor your shipments through internet. On
>> www.coscon.com <http://www.coscon.com/>
>>  
>> Office Hours .:
>> 08.30 - 17.30 hrs (Mon/Thu)
>> 08.30 - 14.00 hrs (Fri)
>>  
>>
>> ------------------------------------------------------------------------
>> *De:* [hidden email]
>> [mailto:[hidden email]] *En nombre de *Kermit Kiser
>> *Enviado el:* lunes, 18 de enero de 2010 22:01
>> *Para:* IBM Netrexx
>> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>
>> I don't quite understand your code. Isn't the "sb" JLabel in the
>> actionPerformed method a temporary local variable that vanishes when
>> you return? How are you displaying it?
>>
>> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>> Hi,
>>>  
>>> my program will call the OpenAction class when "Open" is selected fm
>>> the jtoolbar or jmenu, a filechooser is shown and filtered to show
>>> onlys zips, the file is selected and entries counted and stored into
>>> variable "i".
>>>  
>>> I need that this amount to be shown in a JLabel called "sb" which
>>> has been created in the parent class, the OpenAction code is below,
>>> the program compiles without error but the jlabel text is not set.
>>>  
>>>  
>>> Any help would be appreciated.
>>>  
>>> Thks
>>>  
>>>  
>>>  
>>>  
>>> ..
>>> ..
>>> class eZE.OpenAction dependent extends AbstractAction
>>>   method OpenAction( text = String, icon = ImageIcon )  
>>>   super( text, icon )
>>>  
>>>   method actionPerformed( e = ActionEvent ) public
>>>   mainwindow = JFrame()
>>>   sb         = JLabel()
>>>  
>>>   -- load file chooser using filters
>>>   fc = JFileChooser( "c:\\backup\\ecomstation\\programs\\netdrive" )
>>> -- directory for testing purposes only
>>>   fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>>>   fc.setAcceptAllFileFilterUsed( 0 )
>>>   fc.addChoosableFileFilter( MyFilter() )
>>>  
>>>   -- open file chooser
>>>   returnedval = fc.showOpenDialog( mainwindow )
>>>  
>>>   -- query the filechooser to get user input
>>>   if returnedval = JFileChooser.APPROVE_OPTION then
>>>     do
>>>       zp = fc.getSelectedFile()
>>>       zf = ZipFile( zp )
>>>      
>>>       entries = zf.entries()
>>>      
>>>       -- set counter to hold total entries
>>>       i = 0
>>>      
>>>       loop while entries.hasMoreElements()              
>>>         je = ZipEntry entries.nextElement()
>>>         i = i + 1
>>>       end
>>>      
>>>       catch err=Exception
>>>         say "NetRexxScript.jar ==>" err
>>>     end
>>>   *sb.setText( i )
>>> *  return
>>> ..
>>> ..
>>>  
>>>  
>>>  
>>> Quique
>>>
>>>
>>> /DISCLAIMER:
>>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de
>>> Datos 15/1999, le informamos que sus datos personales estan
>>> incorporados a un fichero denominado clientes, con la unica
>>> finalidad de mantener relaciones profesionales. Si lo desea puede
>>> ejercer los derechos de acceso, rectificacion, cancelacion u
>>> oposicion de sus datos personales dirigiendose a: COSCO IBERIA S.A.
>>> -Responsable Proteccion de Datos- calle Casanova, 2, 6a planta de
>>> Barcelona (08011). Este mensaje y cualquier documento que lleve
>>> adjunto, es confidencial y destinado unicamente a la persona o
>>> entidad a quien ha sido enviado. Si Usted ha recibido este mensaje
>>> por error, le informamos que el contenido en el mismo es reservado y
>>> el uso no autorizado esta prohibido legalmente,por ello,por favor ,
>>> le rogamos que nos lo notifique al e-mail: [hidden email] o
>>> al telefono 93 304 71 26 Si su e-mail no ha podido ser entregado al
>>> buzon de su destinatario, por favor reenvielo a la direccion
>>> [hidden email] If your mail could not be delivered
>>> correctly, please resend it to [hidden email] /
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email]
>>>
>>>  
>>
>>
>> /DISCLAIMER:
>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de
>> Datos 15/1999, le informamos que sus datos personales estan
>> incorporados a un fichero denominado clientes, con la unica finalidad
>> de mantener relaciones profesionales. Si lo desea puede ejercer los
>> derechos de acceso, rectificacion, cancelacion u oposicion de sus
>> datos personales dirigiendose a: COSCO IBERIA S.A. -Responsable
>> Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona
>> (08011). Este mensaje y cualquier documento que lleve adjunto, es
>> confidencial y destinado unicamente a la persona o entidad a quien ha
>> sido enviado. Si Usted ha recibido este mensaje por error, le
>> informamos que el contenido en el mismo es reservado y el uso no
>> autorizado esta prohibido legalmente,por ello,por favor , le rogamos
>> que nos lo notifique al e-mail: [hidden email] o al telefono
>> 93 304 71 26 Si su e-mail no ha podido ser entregado al buzon de su
>> destinatario, por favor reenvielo a la direccion
>> [hidden email] If your mail could not be delivered correctly,
>> please resend it to [hidden email] /
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>>
>>  
>
>
> /DISCLAIMER:
> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de
> Datos 15/1999, le informamos que sus datos personales estan
> incorporados a un fichero denominado clientes, con la unica finalidad
> de mantener relaciones profesionales. Si lo desea puede ejercer los
> derechos de acceso, rectificacion, cancelacion u oposicion de sus
> datos personales dirigiendose a: COSCO IBERIA S.A. -Responsable
> Proteccion de Datos- calle Casanova, 2, 6a planta de Barcelona
> (08011). Este mensaje y cualquier documento que lleve adjunto, es
> confidencial y destinado unicamente a la persona o entidad a quien ha
> sido enviado. Si Usted ha recibido este mensaje por error, le
> informamos que el contenido en el mismo es reservado y el uso no
> autorizado esta prohibido legalmente,por ello,por favor , le rogamos
> que nos lo notifique al e-mail: [hidden email] o al telefono
> 93 304 71 26 Si su e-mail no ha podido ser entregado al buzon de su
> destinatario, por favor reenvielo a la direccion
> [hidden email] If your mail could not be delivered correctly,
> please resend it to [hidden email] /
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/a5ffa6c2/attachment.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Quique Britto
ok that makes sense, so I remove the contructor fm this class, how do I
access the jlabel in the parent class which has been declared as "sb".

2010/1/19 Kermit Kiser <[hidden email]>

>  This code creates a NEW JLabel (constructor is called) and assigns it to
> the sb variable. This new JLabel is not added to any display window, at
> least in this code. The JLabel you previously assigned to sb is unchanged
> and is no longer assigned to sb but is still in any window it was added to
> prior to this code.
>
>
> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>
> the jlabel already exists and is displayed in the parent class, I just need
> to update it's text fm within the Class below.
>
>  Cosco Iberia, S.A.
> Export Trade Manager
> Quique Britto
> Tel.: 96-3939103
> Fax.: 96-3939119
>  [hidden email]
>
>  Track, trace and monitor your shipments through internet. On
> www.coscon.com
>
> Office Hours .:
> 08.30 - 17.30 hrs (Mon/Thu)
> 08.30 - 14.00 hrs (Fri)
>
>
>  ------------------------------
> *De:* [hidden email] [
> mailto:[hidden email]<[hidden email]>]
> *En nombre de *Kermit Kiser
> *Enviado el:* martes, 19 de enero de 2010 10:44
> *Para:* IBM Netrexx
> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>
>  Ah. Perhaps:
>
>  mainwindow.add(sb);mainwindow.show
>
> would do it?
>
> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>
> i want to display the total entries in this Jlbael (sb) before the return
> is performed.
>
>  Cosco Iberia, S.A.
> Export Trade Manager
> Quique Britto
> Tel.: 96-3939103
> Fax.: 96-3939119
>  [hidden email]
>
>  Track, trace and monitor your shipments through internet. On
> www.coscon.com
>
> Office Hours .:
> 08.30 - 17.30 hrs (Mon/Thu)
> 08.30 - 14.00 hrs (Fri)
>
>
>  ------------------------------
> *De:* [hidden email] [
> mailto:[hidden email]<[hidden email]>]
> *En nombre de *Kermit Kiser
> *Enviado el:* lunes, 18 de enero de 2010 22:01
> *Para:* IBM Netrexx
> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>
>  I don't quite understand your code. Isn't the "sb" JLabel in the
> actionPerformed method a temporary local variable that vanishes when you
> return? How are you displaying it?
>
> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>
> Hi,
>
> my program will call the OpenAction class when "Open" is selected fm the
> jtoolbar or jmenu, a filechooser is shown and filtered to show onlys zips,
> the file is selected and entries counted and stored into variable "i".
>
> I need that this amount to be shown in a JLabel called "sb" which has been
> created in the parent class, the OpenAction code is below, the program
> compiles without error but the jlabel text is not set.
>
>
> Any help would be appreciated.
>
> Thks
>
>
>
>
> ..
> ..
> class eZE.OpenAction dependent extends AbstractAction
>   method OpenAction( text = String, icon = ImageIcon )
>   super( text, icon )
>
>   method actionPerformed( e = ActionEvent ) public
>   mainwindow = JFrame()
>   sb         = JLabel()
>
>   -- load file chooser using filters
>   fc = JFileChooser( "c:\\backup\\ecomstation\\programs\\netdrive" ) --
> directory for testing purposes only
>   fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>   fc.setAcceptAllFileFilterUsed( 0 )
>   fc.addChoosableFileFilter( MyFilter() )
>
>   -- open file chooser
>   returnedval = fc.showOpenDialog( mainwindow )
>
>   -- query the filechooser to get user input
>   if returnedval = JFileChooser.APPROVE_OPTION then
>     do
>       zp = fc.getSelectedFile()
>       zf = ZipFile( zp )
>
>       entries = zf.entries()
>
>       -- set counter to hold total entries
>       i = 0
>
>       loop while entries.hasMoreElements()
>         je = ZipEntry entries.nextElement()
>         i = i + 1
>       end
>
>       catch err=Exception
>         say "NetRexxScript.jar ==>" err
>     end
>   *sb.setText( i )
> *  return
> ..
> ..
>
>
>
> Quique
>
>
>  *DISCLAIMER:
> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
> 15/1999, le informamos que sus datos personales estan incorporados a un
> fichero denominado clientes, con la unica finalidad de mantener relaciones
> profesionales. Si lo desea puede ejercer los derechos de acceso,
> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
> adjunto, es confidencial y destinado unicamente a la persona o entidad a
> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
> informamos que el contenido en el mismo es reservado y el uso no autorizado
> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
> notifique al e-mail: [hidden email] o al telefono 93 304 71 26 Si
> su e-mail no ha podido ser entregado al buzon de su destinatario, por favor
> reenvielo a la direccion [hidden email] If your mail could not be
> delivered correctly, please resend it to [hidden email] *
>
> ------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing [hidden email]
>
>
>  *DISCLAIMER:
> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
> 15/1999, le informamos que sus datos personales estan incorporados a un
> fichero denominado clientes, con la unica finalidad de mantener relaciones
> profesionales. Si lo desea puede ejercer los derechos de acceso,
> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
> adjunto, es confidencial y destinado unicamente a la persona o entidad a
> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
> informamos que el contenido en el mismo es reservado y el uso no autorizado
> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
> notifique al e-mail: [hidden email] o al telefono 93 304 71 26 Si
> su e-mail no ha podido ser entregado al buzon de su destinatario, por favor
> reenvielo a la direccion [hidden email] If your mail could not be
> delivered correctly, please resend it to [hidden email] *
>
> ------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing [hidden email]
>
>
>  *DISCLAIMER:
> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
> 15/1999, le informamos que sus datos personales estan incorporados a un
> fichero denominado clientes, con la unica finalidad de mantener relaciones
> profesionales. Si lo desea puede ejercer los derechos de acceso,
> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
> adjunto, es confidencial y destinado unicamente a la persona o entidad a
> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
> informamos que el contenido en el mismo es reservado y el uso no autorizado
> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
> notifique al e-mail: [hidden email] o al telefono 93 304 71 26 Si
> su e-mail no ha podido ser entregado al buzon de su destinatario, por favor
> reenvielo a la direccion [hidden email] If your mail could not be
> delivered correctly, please resend it to [hidden email] *
>
> ------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing [hidden email]
>
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/5cdfa2fc/attachment.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Kermit Kiser
I think

   *parent.**sb.setText( i )

*would do it.

-- Kermit

Quique Britto wrote:

> ok that makes sense, so I remove the contructor fm this class, how do
> I access the jlabel in the parent class which has been declared as "sb".
>
> 2010/1/19 Kermit Kiser <[hidden email]
> <mailto:[hidden email]>>
>
>     This code creates a NEW JLabel (constructor is called) and assigns
>     it to the sb variable. This new JLabel is not added to any display
>     window, at least in this code. The JLabel you previously assigned
>     to sb is unchanged and is no longer assigned to sb but is still in
>     any window it was added to prior to this code.
>
>
>     britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>     the jlabel already exists and is displayed in the parent class, I
>>     just need to update it's text fm within the Class below.
>>      
>>     Cosco Iberia, S.A.
>>     Export Trade Manager
>>     Quique Britto
>>     Tel.: 96-3939103
>>     Fax.: 96-3939119
>>     [hidden email]
>>      
>>     Track, trace and monitor your shipments through internet. On
>>     www.coscon.com <http://www.coscon.com/>
>>      
>>     Office Hours .:
>>     08.30 - 17.30 hrs (Mon/Thu)
>>     08.30 - 14.00 hrs (Fri)
>>      
>>
>>     ------------------------------------------------------------------------
>>     *De:* [hidden email]
>>     <mailto:[hidden email]>
>>     [mailto:[hidden email]] *En nombre de
>>     *Kermit Kiser
>>     *Enviado el:* martes, 19 de enero de 2010 10:44
>>     *Para:* IBM Netrexx
>>     *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>
>>     Ah. Perhaps:
>>
>>      mainwindow.add(sb);mainwindow.show
>>
>>     would do it?
>>
>>     britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>     i want to display the total entries in this Jlbael (sb) before
>>>     the return is performed.
>>>      
>>>     Cosco Iberia, S.A.
>>>     Export Trade Manager
>>>     Quique Britto
>>>     Tel.: 96-3939103
>>>     Fax.: 96-3939119
>>>     [hidden email]
>>>      
>>>     Track, trace and monitor your shipments through internet. On
>>>     www.coscon.com <http://www.coscon.com/>
>>>      
>>>     Office Hours .:
>>>     08.30 - 17.30 hrs (Mon/Thu)
>>>     08.30 - 14.00 hrs (Fri)
>>>      
>>>
>>>     ------------------------------------------------------------------------
>>>     *De:* [hidden email]
>>>     <mailto:[hidden email]>
>>>     [mailto:[hidden email]] *En nombre de
>>>     *Kermit Kiser
>>>     *Enviado el:* lunes, 18 de enero de 2010 22:01
>>>     *Para:* IBM Netrexx
>>>     *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>>
>>>     I don't quite understand your code. Isn't the "sb" JLabel in the
>>>     actionPerformed method a temporary local variable that vanishes
>>>     when you return? How are you displaying it?
>>>
>>>     britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>>     Hi,
>>>>      
>>>>     my program will call the OpenAction class when "Open" is
>>>>     selected fm the jtoolbar or jmenu, a filechooser is shown and
>>>>     filtered to show onlys zips, the file is selected and entries
>>>>     counted and stored into variable "i".
>>>>      
>>>>     I need that this amount to be shown in a JLabel called "sb"
>>>>     which has been created in the parent class, the OpenAction code
>>>>     is below, the program compiles without error but the jlabel
>>>>     text is not set.
>>>>      
>>>>      
>>>>     Any help would be appreciated.
>>>>      
>>>>     Thks
>>>>      
>>>>      
>>>>      
>>>>      
>>>>     ..
>>>>     ..
>>>>     class eZE.OpenAction dependent extends AbstractAction
>>>>       method OpenAction( text = String, icon = ImageIcon )  
>>>>       super( text, icon )
>>>>      
>>>>       method actionPerformed( e = ActionEvent ) public
>>>>       mainwindow = JFrame()
>>>>       sb         = JLabel()
>>>>      
>>>>       -- load file chooser using filters
>>>>       fc = JFileChooser(
>>>>     "c:\\backup\\ecomstation\\programs\\netdrive" ) -- directory
>>>>     for testing purposes only
>>>>       fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>>>>       fc.setAcceptAllFileFilterUsed( 0 )
>>>>       fc.addChoosableFileFilter( MyFilter() )
>>>>      
>>>>       -- open file chooser
>>>>       returnedval = fc.showOpenDialog( mainwindow )
>>>>      
>>>>       -- query the filechooser to get user input
>>>>       if returnedval = JFileChooser.APPROVE_OPTION then
>>>>         do
>>>>           zp = fc.getSelectedFile()
>>>>           zf = ZipFile( zp )
>>>>          
>>>>           entries = zf.entries()
>>>>          
>>>>           -- set counter to hold total entries
>>>>           i = 0
>>>>          
>>>>           loop while entries.hasMoreElements()              
>>>>             je = ZipEntry entries.nextElement()
>>>>             i = i + 1
>>>>           end
>>>>          
>>>>           catch err=Exception
>>>>             say "NetRexxScript.jar ==>" err
>>>>         end
>>>>       *sb.setText( i )
>>>>     *  return
>>>>     ..
>>>>     ..
>>>>      
>>>>      
>>>>      
>>>>     Quique
>>>>
>>>>
>>>>     /DISCLAIMER:
>>>>     En cumplimiento del articulo 5 de la Ley Organica de Proteccion
>>>>     de Datos 15/1999, le informamos que sus datos personales estan
>>>>     incorporados a un fichero denominado clientes, con la unica
>>>>     finalidad de mantener relaciones profesionales. Si lo desea
>>>>     puede ejercer los derechos de acceso, rectificacion,
>>>>     cancelacion u oposicion de sus datos personales dirigiendose a:
>>>>     COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle
>>>>     Casanova, 2, 6a planta de Barcelona (08011). Este mensaje y
>>>>     cualquier documento que lleve adjunto, es confidencial y
>>>>     destinado unicamente a la persona o entidad a quien ha sido
>>>>     enviado. Si Usted ha recibido este mensaje por error, le
>>>>     informamos que el contenido en el mismo es reservado y el uso
>>>>     no autorizado esta prohibido legalmente,por ello,por favor , le
>>>>     rogamos que nos lo notifique al e-mail: [hidden email]
>>>>     <mailto:[hidden email]> o al telefono 93 304 71 26 Si
>>>>     su e-mail no ha podido ser entregado al buzon de su
>>>>     destinatario, por favor reenvielo a la direccion
>>>>     [hidden email] <mailto:[hidden email]> If your
>>>>     mail could not be delivered correctly, please resend it to
>>>>     [hidden email] <mailto:[hidden email]> /
>>>>     ------------------------------------------------------------------------
>>>>
>>>>     _______________________________________________
>>>>     Ibm-netrexx mailing list
>>>>     [hidden email] <mailto:[hidden email]>
>>>>
>>>>      
>>>
>>>
>>>     /DISCLAIMER:
>>>     En cumplimiento del articulo 5 de la Ley Organica de Proteccion
>>>     de Datos 15/1999, le informamos que sus datos personales estan
>>>     incorporados a un fichero denominado clientes, con la unica
>>>     finalidad de mantener relaciones profesionales. Si lo desea
>>>     puede ejercer los derechos de acceso, rectificacion, cancelacion
>>>     u oposicion de sus datos personales dirigiendose a: COSCO IBERIA
>>>     S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>>>     planta de Barcelona (08011). Este mensaje y cualquier documento
>>>     que lleve adjunto, es confidencial y destinado unicamente a la
>>>     persona o entidad a quien ha sido enviado. Si Usted ha recibido
>>>     este mensaje por error, le informamos que el contenido en el
>>>     mismo es reservado y el uso no autorizado esta prohibido
>>>     legalmente,por ello,por favor , le rogamos que nos lo notifique
>>>     al e-mail: [hidden email]
>>>     <mailto:[hidden email]> o al telefono 93 304 71 26 Si
>>>     su e-mail no ha podido ser entregado al buzon de su
>>>     destinatario, por favor reenvielo a la direccion
>>>     [hidden email] <mailto:[hidden email]> If your
>>>     mail could not be delivered correctly, please resend it to
>>>     [hidden email] <mailto:[hidden email]> /
>>>     ------------------------------------------------------------------------
>>>
>>>     _______________________________________________
>>>     Ibm-netrexx mailing list
>>>     [hidden email] <mailto:[hidden email]>
>>>
>>>      
>>
>>
>>     /DISCLAIMER:
>>     En cumplimiento del articulo 5 de la Ley Organica de Proteccion
>>     de Datos 15/1999, le informamos que sus datos personales estan
>>     incorporados a un fichero denominado clientes, con la unica
>>     finalidad de mantener relaciones profesionales. Si lo desea puede
>>     ejercer los derechos de acceso, rectificacion, cancelacion u
>>     oposicion de sus datos personales dirigiendose a: COSCO IBERIA
>>     S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>>     planta de Barcelona (08011). Este mensaje y cualquier documento
>>     que lleve adjunto, es confidencial y destinado unicamente a la
>>     persona o entidad a quien ha sido enviado. Si Usted ha recibido
>>     este mensaje por error, le informamos que el contenido en el
>>     mismo es reservado y el uso no autorizado esta prohibido
>>     legalmente,por ello,por favor , le rogamos que nos lo notifique
>>     al e-mail: [hidden email]
>>     <mailto:[hidden email]> o al telefono 93 304 71 26 Si su
>>     e-mail no ha podido ser entregado al buzon de su destinatario,
>>     por favor reenvielo a la direccion [hidden email]
>>     <mailto:[hidden email]> If your mail could not be
>>     delivered correctly, please resend it to [hidden email]
>>     <mailto:[hidden email]> /
>>     ------------------------------------------------------------------------
>>
>>     _______________________________________________
>>     Ibm-netrexx mailing list
>>     [hidden email] <mailto:[hidden email]>
>>
>>      
>
>     _______________________________________________
>     Ibm-netrexx mailing list
>     [hidden email] <mailto:[hidden email]>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/a6ef8201/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Quique Britto
no, it does not work.
error: the method "setText(java.io.file)" cannot be found in class
"javax.swing.JTextField" or superclass

everytime sb is not declared in this class i receive the same msg.



2010/1/19 Kermit Kiser <[hidden email]>

>  I think
>
>    *parent.**sb.setText( i )
>
> *would do it.
>
> -- Kermit
>
> Quique Britto wrote:
>
> ok that makes sense, so I remove the contructor fm this class, how do I
> access the jlabel in the parent class which has been declared as "sb".
>
> 2010/1/19 Kermit Kiser <[hidden email]>
>
>>  This code creates a NEW JLabel (constructor is called) and assigns it to
>> the sb variable. This new JLabel is not added to any display window, at
>> least in this code. The JLabel you previously assigned to sb is unchanged
>> and is no longer assigned to sb but is still in any window it was added to
>> prior to this code.
>>
>>
>> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>
>> the jlabel already exists and is displayed in the parent class, I just
>> need to update it's text fm within the Class below.
>>
>>  Cosco Iberia, S.A.
>> Export Trade Manager
>> Quique Britto
>> Tel.: 96-3939103
>> Fax.: 96-3939119
>>  [hidden email]
>>
>>  Track, trace and monitor your shipments through internet. On
>> www.coscon.com
>>
>> Office Hours .:
>> 08.30 - 17.30 hrs (Mon/Thu)
>> 08.30 - 14.00 hrs (Fri)
>>
>>
>>  ------------------------------
>> *De:* [hidden email] [
>> mailto:[hidden email]<[hidden email]>]
>> *En nombre de *Kermit Kiser
>> *Enviado el:* martes, 19 de enero de 2010 10:44
>> *Para:* IBM Netrexx
>> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>
>>  Ah. Perhaps:
>>
>>  mainwindow.add(sb);mainwindow.show
>>
>> would do it?
>>
>> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>
>> i want to display the total entries in this Jlbael (sb) before the return
>> is performed.
>>
>>  Cosco Iberia, S.A.
>> Export Trade Manager
>> Quique Britto
>> Tel.: 96-3939103
>> Fax.: 96-3939119
>>  [hidden email]
>>
>>  Track, trace and monitor your shipments through internet. On
>> www.coscon.com
>>
>> Office Hours .:
>> 08.30 - 17.30 hrs (Mon/Thu)
>> 08.30 - 14.00 hrs (Fri)
>>
>>
>>  ------------------------------
>> *De:* [hidden email] [
>> mailto:[hidden email]<[hidden email]>]
>> *En nombre de *Kermit Kiser
>> *Enviado el:* lunes, 18 de enero de 2010 22:01
>> *Para:* IBM Netrexx
>> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>
>>  I don't quite understand your code. Isn't the "sb" JLabel in the
>> actionPerformed method a temporary local variable that vanishes when you
>> return? How are you displaying it?
>>
>> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>
>> Hi,
>>
>> my program will call the OpenAction class when "Open" is selected fm the
>> jtoolbar or jmenu, a filechooser is shown and filtered to show onlys zips,
>> the file is selected and entries counted and stored into variable "i".
>>
>> I need that this amount to be shown in a JLabel called "sb" which has been
>> created in the parent class, the OpenAction code is below, the program
>> compiles without error but the jlabel text is not set.
>>
>>
>> Any help would be appreciated.
>>
>> Thks
>>
>>
>>
>>
>> ..
>> ..
>> class eZE.OpenAction dependent extends AbstractAction
>>   method OpenAction( text = String, icon = ImageIcon )
>>   super( text, icon )
>>
>>   method actionPerformed( e = ActionEvent ) public
>>   mainwindow = JFrame()
>>   sb         = JLabel()
>>
>>   -- load file chooser using filters
>>   fc = JFileChooser( "c:\\backup\\ecomstation\\programs\\netdrive" ) --
>> directory for testing purposes only
>>   fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>>   fc.setAcceptAllFileFilterUsed( 0 )
>>   fc.addChoosableFileFilter( MyFilter() )
>>
>>   -- open file chooser
>>   returnedval = fc.showOpenDialog( mainwindow )
>>
>>   -- query the filechooser to get user input
>>   if returnedval = JFileChooser.APPROVE_OPTION then
>>     do
>>       zp = fc.getSelectedFile()
>>       zf = ZipFile( zp )
>>
>>       entries = zf.entries()
>>
>>       -- set counter to hold total entries
>>       i = 0
>>
>>       loop while entries.hasMoreElements()
>>         je = ZipEntry entries.nextElement()
>>         i = i + 1
>>       end
>>
>>       catch err=Exception
>>         say "NetRexxScript.jar ==>" err
>>     end
>>   *sb.setText( i )
>> *  return
>> ..
>> ..
>>
>>
>>
>> Quique
>>
>>
>>  *DISCLAIMER:
>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
>> 15/1999, le informamos que sus datos personales estan incorporados a un
>> fichero denominado clientes, con la unica finalidad de mantener relaciones
>> profesionales. Si lo desea puede ejercer los derechos de acceso,
>> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
>> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
>> adjunto, es confidencial y destinado unicamente a la persona o entidad a
>> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
>> informamos que el contenido en el mismo es reservado y el uso no autorizado
>> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
>> notifique al e-mail: [hidden email] o al telefono 93 304 71 26
>> Si su e-mail no ha podido ser entregado al buzon de su destinatario, por
>> favor reenvielo a la direccion [hidden email] If your mail could
>> not be delivered correctly, please resend it to [hidden email] *
>>
>> ------------------------------
>>
>> _______________________________________________
>> Ibm-netrexx mailing [hidden email]
>>
>>
>>  *DISCLAIMER:
>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
>> 15/1999, le informamos que sus datos personales estan incorporados a un
>> fichero denominado clientes, con la unica finalidad de mantener relaciones
>> profesionales. Si lo desea puede ejercer los derechos de acceso,
>> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
>> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
>> adjunto, es confidencial y destinado unicamente a la persona o entidad a
>> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
>> informamos que el contenido en el mismo es reservado y el uso no autorizado
>> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
>> notifique al e-mail: [hidden email] o al telefono 93 304 71 26
>> Si su e-mail no ha podido ser entregado al buzon de su destinatario, por
>> favor reenvielo a la direccion [hidden email] If your mail could
>> not be delivered correctly, please resend it to [hidden email] *
>>
>> ------------------------------
>>
>> _______________________________________________
>> Ibm-netrexx mailing [hidden email]
>>
>>
>>  *DISCLAIMER:
>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
>> 15/1999, le informamos que sus datos personales estan incorporados a un
>> fichero denominado clientes, con la unica finalidad de mantener relaciones
>> profesionales. Si lo desea puede ejercer los derechos de acceso,
>> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
>> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
>> adjunto, es confidencial y destinado unicamente a la persona o entidad a
>> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
>> informamos que el contenido en el mismo es reservado y el uso no autorizado
>> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
>> notifique al e-mail: [hidden email] o al telefono 93 304 71 26
>> Si su e-mail no ha podido ser entregado al buzon de su destinatario, por
>> favor reenvielo a la direccion [hidden email] If your mail could
>> not be delivered correctly, please resend it to [hidden email] *
>>
>> ------------------------------
>>
>> _______________________________________________
>> Ibm-netrexx mailing [hidden email]
>>
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>>
>>
>>
> ------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing [hidden email]
>
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/501349a7/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Kermit Kiser
There are no File or JTextField objects in this code. I don't think that
error is directly caused by this part.  How is sb created?

Quique Britto wrote:

> no, it does not work.
> error: the method "setText(java.io.file)" cannot be found in class
> "javax.swing.JTextField" or superclass
>
> everytime sb is not declared in this class i receive the same msg.
>
>
>
> 2010/1/19 Kermit Kiser <[hidden email]
> <mailto:[hidden email]>>
>
>     I think
>
>        *parent.**sb.setText( i )
>
>     *would do it.
>
>     -- Kermit
>
>     Quique Britto wrote:
>>     ok that makes sense, so I remove the contructor fm this class,
>>     how do I access the jlabel in the parent class which has been
>>     declared as "sb".
>>
>>     2010/1/19 Kermit Kiser <[hidden email]
>>     <mailto:[hidden email]>>
>>
>>         This code creates a NEW JLabel (constructor is called) and
>>         assigns it to the sb variable. This new JLabel is not added
>>         to any display window, at least in this code. The JLabel you
>>         previously assigned to sb is unchanged and is no longer
>>         assigned to sb but is still in any window it was added to
>>         prior to this code.
>>
>>
>>         britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>         the jlabel already exists and is displayed in the parent
>>>         class, I just need to update it's text fm within the Class
>>>         below.
>>>          
>>>         Cosco Iberia, S.A.
>>>         Export Trade Manager
>>>         Quique Britto
>>>         Tel.: 96-3939103
>>>         Fax.: 96-3939119
>>>         [hidden email]
>>>          
>>>         Track, trace and monitor your shipments through internet. On
>>>         www.coscon.com <http://www.coscon.com/>
>>>          
>>>         Office Hours .:
>>>         08.30 - 17.30 hrs (Mon/Thu)
>>>         08.30 - 14.00 hrs (Fri)
>>>          
>>>
>>>         ------------------------------------------------------------------------
>>>         *De:* [hidden email]
>>>         <mailto:[hidden email]>
>>>         [mailto:[hidden email]] *En nombre de
>>>         *Kermit Kiser
>>>         *Enviado el:* martes, 19 de enero de 2010 10:44
>>>         *Para:* IBM Netrexx
>>>         *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>>
>>>         Ah. Perhaps:
>>>
>>>          mainwindow.add(sb);mainwindow.show
>>>
>>>         would do it?
>>>
>>>         britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>>         i want to display the total entries in this Jlbael (sb)
>>>>         before the return is performed.
>>>>          
>>>>         Cosco Iberia, S.A.
>>>>         Export Trade Manager
>>>>         Quique Britto
>>>>         Tel.: 96-3939103
>>>>         Fax.: 96-3939119
>>>>         [hidden email]
>>>>          
>>>>         Track, trace and monitor your shipments through internet.
>>>>         On www.coscon.com <http://www.coscon.com/>
>>>>          
>>>>         Office Hours .:
>>>>         08.30 - 17.30 hrs (Mon/Thu)
>>>>         08.30 - 14.00 hrs (Fri)
>>>>          
>>>>
>>>>         ------------------------------------------------------------------------
>>>>         *De:* [hidden email]
>>>>         <mailto:[hidden email]>
>>>>         [mailto:[hidden email]] *En nombre de
>>>>         *Kermit Kiser
>>>>         *Enviado el:* lunes, 18 de enero de 2010 22:01
>>>>         *Para:* IBM Netrexx
>>>>         *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>>>
>>>>         I don't quite understand your code. Isn't the "sb" JLabel
>>>>         in the actionPerformed method a temporary local variable
>>>>         that vanishes when you return? How are you displaying it?
>>>>
>>>>         britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>>>         Hi,
>>>>>          
>>>>>         my program will call the OpenAction class when "Open" is
>>>>>         selected fm the jtoolbar or jmenu, a filechooser is shown
>>>>>         and filtered to show onlys zips, the file is selected and
>>>>>         entries counted and stored into variable "i".
>>>>>          
>>>>>         I need that this amount to be shown in a JLabel called
>>>>>         "sb" which has been created in the parent class, the
>>>>>         OpenAction code is below, the program compiles without
>>>>>         error but the jlabel text is not set.
>>>>>          
>>>>>          
>>>>>         Any help would be appreciated.
>>>>>          
>>>>>         Thks
>>>>>          
>>>>>          
>>>>>          
>>>>>          
>>>>>         ..
>>>>>         ..
>>>>>         class eZE.OpenAction dependent extends AbstractAction
>>>>>           method OpenAction( text = String, icon = ImageIcon )  
>>>>>           super( text, icon )
>>>>>          
>>>>>           method actionPerformed( e = ActionEvent ) public
>>>>>           mainwindow = JFrame()
>>>>>           sb         = JLabel()
>>>>>          
>>>>>           -- load file chooser using filters
>>>>>           fc = JFileChooser(
>>>>>         "c:\\backup\\ecomstation\\programs\\netdrive" ) --
>>>>>         directory for testing purposes only
>>>>>           fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>>>>>           fc.setAcceptAllFileFilterUsed( 0 )
>>>>>           fc.addChoosableFileFilter( MyFilter() )
>>>>>          
>>>>>           -- open file chooser
>>>>>           returnedval = fc.showOpenDialog( mainwindow )
>>>>>          
>>>>>           -- query the filechooser to get user input
>>>>>           if returnedval = JFileChooser.APPROVE_OPTION then
>>>>>             do
>>>>>               zp = fc.getSelectedFile()
>>>>>               zf = ZipFile( zp )
>>>>>              
>>>>>               entries = zf.entries()
>>>>>              
>>>>>               -- set counter to hold total entries
>>>>>               i = 0
>>>>>              
>>>>>               loop while entries.hasMoreElements()              
>>>>>                 je = ZipEntry entries.nextElement()
>>>>>                 i = i + 1
>>>>>               end
>>>>>              
>>>>>               catch err=Exception
>>>>>                 say "NetRexxScript.jar ==>" err
>>>>>             end
>>>>>           *sb.setText( i )
>>>>>         *  return
>>>>>         ..
>>>>>         ..
>>>>>          
>>>>>          
>>>>>          
>>>>>         Quique
>>>>>
>>>>>
>>>>>         /DISCLAIMER:
>>>>>         En cumplimiento del articulo 5 de la Ley Organica de
>>>>>         Proteccion de Datos 15/1999, le informamos que sus datos
>>>>>         personales estan incorporados a un fichero denominado
>>>>>         clientes, con la unica finalidad de mantener relaciones
>>>>>         profesionales. Si lo desea puede ejercer los derechos de
>>>>>         acceso, rectificacion, cancelacion u oposicion de sus
>>>>>         datos personales dirigiendose a: COSCO IBERIA S.A.
>>>>>         -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>>>>>         planta de Barcelona (08011). Este mensaje y cualquier
>>>>>         documento que lleve adjunto, es confidencial y destinado
>>>>>         unicamente a la persona o entidad a quien ha sido enviado.
>>>>>         Si Usted ha recibido este mensaje por error, le informamos
>>>>>         que el contenido en el mismo es reservado y el uso no
>>>>>         autorizado esta prohibido legalmente,por ello,por favor ,
>>>>>         le rogamos que nos lo notifique al e-mail:
>>>>>         [hidden email] <mailto:[hidden email]> o
>>>>>         al telefono 93 304 71 26 Si su e-mail no ha podido ser
>>>>>         entregado al buzon de su destinatario, por favor reenvielo
>>>>>         a la direccion [hidden email]
>>>>>         <mailto:[hidden email]> If your mail could not be
>>>>>         delivered correctly, please resend it to
>>>>>         [hidden email] <mailto:[hidden email]> /
>>>>>         ------------------------------------------------------------------------
>>>>>
>>>>>         _______________________________________________
>>>>>         Ibm-netrexx mailing list
>>>>>         [hidden email] <mailto:[hidden email]>
>>>>>
>>>>>          
>>>>
>>>>
>>>>         /DISCLAIMER:
>>>>         En cumplimiento del articulo 5 de la Ley Organica de
>>>>         Proteccion de Datos 15/1999, le informamos que sus datos
>>>>         personales estan incorporados a un fichero denominado
>>>>         clientes, con la unica finalidad de mantener relaciones
>>>>         profesionales. Si lo desea puede ejercer los derechos de
>>>>         acceso, rectificacion, cancelacion u oposicion de sus datos
>>>>         personales dirigiendose a: COSCO IBERIA S.A. -Responsable
>>>>         Proteccion de Datos- calle Casanova, 2, 6a planta de
>>>>         Barcelona (08011). Este mensaje y cualquier documento que
>>>>         lleve adjunto, es confidencial y destinado unicamente a la
>>>>         persona o entidad a quien ha sido enviado. Si Usted ha
>>>>         recibido este mensaje por error, le informamos que el
>>>>         contenido en el mismo es reservado y el uso no autorizado
>>>>         esta prohibido legalmente,por ello,por favor , le rogamos
>>>>         que nos lo notifique al e-mail: [hidden email]
>>>>         <mailto:[hidden email]> o al telefono 93 304 71 26
>>>>         Si su e-mail no ha podido ser entregado al buzon de su
>>>>         destinatario, por favor reenvielo a la direccion
>>>>         [hidden email] <mailto:[hidden email]> If
>>>>         your mail could not be delivered correctly, please resend
>>>>         it to [hidden email] <mailto:[hidden email]> /
>>>>         ------------------------------------------------------------------------
>>>>
>>>>         _______________________________________________
>>>>         Ibm-netrexx mailing list
>>>>         [hidden email] <mailto:[hidden email]>
>>>>
>>>>          
>>>
>>>
>>>         /DISCLAIMER:
>>>         En cumplimiento del articulo 5 de la Ley Organica de
>>>         Proteccion de Datos 15/1999, le informamos que sus datos
>>>         personales estan incorporados a un fichero denominado
>>>         clientes, con la unica finalidad de mantener relaciones
>>>         profesionales. Si lo desea puede ejercer los derechos de
>>>         acceso, rectificacion, cancelacion u oposicion de sus datos
>>>         personales dirigiendose a: COSCO IBERIA S.A. -Responsable
>>>         Proteccion de Datos- calle Casanova, 2, 6a planta de
>>>         Barcelona (08011). Este mensaje y cualquier documento que
>>>         lleve adjunto, es confidencial y destinado unicamente a la
>>>         persona o entidad a quien ha sido enviado. Si Usted ha
>>>         recibido este mensaje por error, le informamos que el
>>>         contenido en el mismo es reservado y el uso no autorizado
>>>         esta prohibido legalmente,por ello,por favor , le rogamos
>>>         que nos lo notifique al e-mail: [hidden email]
>>>         <mailto:[hidden email]> o al telefono 93 304 71 26
>>>         Si su e-mail no ha podido ser entregado al buzon de su
>>>         destinatario, por favor reenvielo a la direccion
>>>         [hidden email] <mailto:[hidden email]> If
>>>         your mail could not be delivered correctly, please resend it
>>>         to [hidden email] <mailto:[hidden email]> /
>>>         ------------------------------------------------------------------------
>>>
>>>         _______________________________________________
>>>         Ibm-netrexx mailing list
>>>         [hidden email] <mailto:[hidden email]>
>>>
>>>          
>>
>>         _______________________________________________
>>         Ibm-netrexx mailing list
>>         [hidden email] <mailto:[hidden email]>
>>
>>
>>
>>     ------------------------------------------------------------------------
>>
>>     _______________________________________________
>>     Ibm-netrexx mailing list
>>     [hidden email] <mailto:[hidden email]>
>>
>>      
>
>     _______________________________________________
>     Ibm-netrexx mailing list
>     [hidden email] <mailto:[hidden email]>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100119/0b9eca0d/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Quique Britto
main (parent) class
----------------------------
class eZE implements ActionListener
  properties inheritable
  -- general variables
  currentdate   = Date               -- self explained
  configfile    = File("Config.dat") -- self explained
  build         = Rexx("0.1")        -- eZE build
  zipfile       = File               -- archive to open

  -- frame variables
  mainwindow = JFrame()

  mb  = JMenubar()
    menubar = JMenu[3]
      filemenu_it = JMenuItem
      editmenu_it = JMenuItem[8]
      infomenu_it = JMenuItem

  jp  = JPanel()
    tb = JToolbar()
      toolbar_bt = JButton[8]

  jp2 = JPanel()
    jp3 = JPanel()
      t_elements = JLabel()
      t_selected = JLabel()
    jp4 = JPanel()
      sb  = JLabel()

..
..

2010/1/20 Kermit Kiser <[hidden email]>

>  There are no File or JTextField objects in this code. I don't think that
> error is directly caused by this part.  How is sb created?
>
>
> Quique Britto wrote:
>
> no, it does not work.
> error: the method "setText(java.io.file)" cannot be found in class
> "javax.swing.JTextField" or superclass
>
> everytime sb is not declared in this class i receive the same msg.
>
>
>
> 2010/1/19 Kermit Kiser <[hidden email]>
>
>> I think
>>
>>    *parent.**sb.setText( i )
>>
>> *would do it.
>>
>> -- Kermit
>>
>> Quique Britto wrote:
>>
>> ok that makes sense, so I remove the contructor fm this class, how do I
>> access the jlabel in the parent class which has been declared as "sb".
>>
>> 2010/1/19 Kermit Kiser <[hidden email]>
>>
>>> This code creates a NEW JLabel (constructor is called) and assigns it to
>>> the sb variable. This new JLabel is not added to any display window, at
>>> least in this code. The JLabel you previously assigned to sb is unchanged
>>> and is no longer assigned to sb but is still in any window it was added to
>>> prior to this code.
>>>
>>>
>>> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>
>>> the jlabel already exists and is displayed in the parent class, I just
>>> need to update it's text fm within the Class below.
>>>
>>>  Cosco Iberia, S.A.
>>> Export Trade Manager
>>> Quique Britto
>>> Tel.: 96-3939103
>>> Fax.: 96-3939119
>>>  [hidden email]
>>>
>>>  Track, trace and monitor your shipments through internet. On
>>> www.coscon.com
>>>
>>> Office Hours .:
>>> 08.30 - 17.30 hrs (Mon/Thu)
>>> 08.30 - 14.00 hrs (Fri)
>>>
>>>
>>>  ------------------------------
>>> *De:* [hidden email] [
>>> mailto:[hidden email]<[hidden email]>]
>>> *En nombre de *Kermit Kiser
>>> *Enviado el:* martes, 19 de enero de 2010 10:44
>>> *Para:* IBM Netrexx
>>> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>>
>>>  Ah. Perhaps:
>>>
>>>  mainwindow.add(sb);mainwindow.show
>>>
>>> would do it?
>>>
>>> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>
>>> i want to display the total entries in this Jlbael (sb) before the return
>>> is performed.
>>>
>>>  Cosco Iberia, S.A.
>>> Export Trade Manager
>>> Quique Britto
>>> Tel.: 96-3939103
>>> Fax.: 96-3939119
>>>  [hidden email]
>>>
>>>  Track, trace and monitor your shipments through internet. On
>>> www.coscon.com
>>>
>>> Office Hours .:
>>> 08.30 - 17.30 hrs (Mon/Thu)
>>> 08.30 - 14.00 hrs (Fri)
>>>
>>>
>>>  ------------------------------
>>> *De:* [hidden email] [
>>> mailto:[hidden email]<[hidden email]>]
>>> *En nombre de *Kermit Kiser
>>> *Enviado el:* lunes, 18 de enero de 2010 22:01
>>> *Para:* IBM Netrexx
>>> *Asunto:* Re: [Ibm-netrexx] JLabel - Setting the text
>>>
>>>  I don't quite understand your code. Isn't the "sb" JLabel in the
>>> actionPerformed method a temporary local variable that vanishes when you
>>> return? How are you displaying it?
>>>
>>> britten /Quique Britto (SPAIN VAL Export Mngr AMX) wrote:
>>>
>>> Hi,
>>>
>>> my program will call the OpenAction class when "Open" is selected fm the
>>> jtoolbar or jmenu, a filechooser is shown and filtered to show onlys zips,
>>> the file is selected and entries counted and stored into variable "i".
>>>
>>> I need that this amount to be shown in a JLabel called "sb" which has
>>> been created in the parent class, the OpenAction code is below, the program
>>> compiles without error but the jlabel text is not set.
>>>
>>>
>>> Any help would be appreciated.
>>>
>>> Thks
>>>
>>>
>>>
>>>
>>> ..
>>> ..
>>> class eZE.OpenAction dependent extends AbstractAction
>>>   method OpenAction( text = String, icon = ImageIcon )
>>>   super( text, icon )
>>>
>>>   method actionPerformed( e = ActionEvent ) public
>>>   mainwindow = JFrame()
>>>   sb         = JLabel()
>>>
>>>   -- load file chooser using filters
>>>   fc = JFileChooser( "c:\\backup\\ecomstation\\programs\\netdrive" ) --
>>> directory for testing purposes only
>>>   fc.setFileSelectionMode( JFileChooser.FILES_ONLY )
>>>   fc.setAcceptAllFileFilterUsed( 0 )
>>>   fc.addChoosableFileFilter( MyFilter() )
>>>
>>>   -- open file chooser
>>>   returnedval = fc.showOpenDialog( mainwindow )
>>>
>>>   -- query the filechooser to get user input
>>>   if returnedval = JFileChooser.APPROVE_OPTION then
>>>     do
>>>       zp = fc.getSelectedFile()
>>>       zf = ZipFile( zp )
>>>
>>>       entries = zf.entries()
>>>
>>>       -- set counter to hold total entries
>>>       i = 0
>>>
>>>       loop while entries.hasMoreElements()
>>>         je = ZipEntry entries.nextElement()
>>>         i = i + 1
>>>       end
>>>
>>>       catch err=Exception
>>>         say "NetRexxScript.jar ==>" err
>>>     end
>>>   *sb.setText( i )
>>> *  return
>>> ..
>>> ..
>>>
>>>
>>>
>>> Quique
>>>
>>>
>>>  *DISCLAIMER:
>>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
>>> 15/1999, le informamos que sus datos personales estan incorporados a un
>>> fichero denominado clientes, con la unica finalidad de mantener relaciones
>>> profesionales. Si lo desea puede ejercer los derechos de acceso,
>>> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
>>> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>>> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
>>> adjunto, es confidencial y destinado unicamente a la persona o entidad a
>>> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
>>> informamos que el contenido en el mismo es reservado y el uso no autorizado
>>> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
>>> notifique al e-mail: [hidden email] o al telefono 93 304 71 26
>>> Si su e-mail no ha podido ser entregado al buzon de su destinatario, por
>>> favor reenvielo a la direccion [hidden email] If your mail could
>>> not be delivered correctly, please resend it to [hidden email] *
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing [hidden email]
>>>
>>>
>>>  *DISCLAIMER:
>>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
>>> 15/1999, le informamos que sus datos personales estan incorporados a un
>>> fichero denominado clientes, con la unica finalidad de mantener relaciones
>>> profesionales. Si lo desea puede ejercer los derechos de acceso,
>>> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
>>> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>>> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
>>> adjunto, es confidencial y destinado unicamente a la persona o entidad a
>>> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
>>> informamos que el contenido en el mismo es reservado y el uso no autorizado
>>> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
>>> notifique al e-mail: [hidden email] o al telefono 93 304 71 26
>>> Si su e-mail no ha podido ser entregado al buzon de su destinatario, por
>>> favor reenvielo a la direccion [hidden email] If your mail could
>>> not be delivered correctly, please resend it to [hidden email] *
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing [hidden email]
>>>
>>>
>>>  *DISCLAIMER:
>>> En cumplimiento del articulo 5 de la Ley Organica de Proteccion de Datos
>>> 15/1999, le informamos que sus datos personales estan incorporados a un
>>> fichero denominado clientes, con la unica finalidad de mantener relaciones
>>> profesionales. Si lo desea puede ejercer los derechos de acceso,
>>> rectificacion, cancelacion u oposicion de sus datos personales dirigiendose
>>> a: COSCO IBERIA S.A. -Responsable Proteccion de Datos- calle Casanova, 2, 6a
>>> planta de Barcelona (08011). Este mensaje y cualquier documento que lleve
>>> adjunto, es confidencial y destinado unicamente a la persona o entidad a
>>> quien ha sido enviado. Si Usted ha recibido este mensaje por error, le
>>> informamos que el contenido en el mismo es reservado y el uso no autorizado
>>> esta prohibido legalmente,por ello,por favor , le rogamos que nos lo
>>> notifique al e-mail: [hidden email] o al telefono 93 304 71 26
>>> Si su e-mail no ha podido ser entregado al buzon de su destinatario, por
>>> favor reenvielo a la direccion [hidden email] If your mail could
>>> not be delivered correctly, please resend it to [hidden email] *
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing [hidden email]
>>>
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email]
>>>
>>>
>>>
>> ------------------------------
>>
>> _______________________________________________
>> Ibm-netrexx mailing [hidden email]
>>
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>>
>>
>>
> ------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing [hidden email]
>
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100120/b35043ef/attachment-0001.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

measel
An example ( parts missing indicated with "..." )

 

class journalMarkers extends JFrame implements TableModelListener,
ActionListener

               

topPanel = JPanel

crumbTable = JTable

scrollPane = JScrollPane

quitItem = JMenuItem('Exit')

newMarkerItem = JMenuItem('New Marker')

...

....

method main( args = String[]) static public

                 

     journalMarkers()

                 

method journalMarkers() signals Exception, FileNotFoundException,
IOException

 

                quitItem.setMnemonic('x')


                quitItem.setAccelerator(KeyStroke.getKeyStroke("alt X"))

                quitItem.addActionListener(this)

                newMarkerItem.addActionListener(this)

                menuBar = JMenuBar()

                fileMenu = JMenu('File')

                fileMenu.setMnemonic('F')

                menuBar.add(fileMenu)

                fileMenu.add(newMarkerItem)

                fileMenu.add(quitItem)

                this.setJmenuBar(menuBar)

                this.setTitle("Journal entries")

                this.setSize(1000,300)

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)

                c = this.getContentPane()

                c.setLayout(BorderLayout())

topPanel = JPanel()


topPanel.setSize(490, 290)

bl = BorderLayout()

topPanel.setLayout(bl)

topPanel.setBackground(Color.green)

c.add(topPanel)

....

....

btnSelect = Button("Select");

btnSelect.addActionListener(this)

...

colnames = String[7]

colnames[0] = 'Name'

colnames[1] = 'Date/Time'

colnames[2] = 'Hosts'

colnames[3] = 'Process'

colnames[4] = 'Agents'

colnames[5] = 'Metrics'

colnames[6] = 'Duration (min)'

aobj = Object[20,7]

n = 0

loop aname over timeSlots

....

....

crumbTable = JTable(aobj, colnames)

crumbTable.getModel().addTableModelListener(this)

crumbCM = crumbTable.getColumnModel()

crumbCM.getColumn(0).setPreferredWidth(170)

crumbCM.getColumn(1).setPreferredWidth(210)

...

scrollPane = JScrollPane(crumbTable)

topPanel.add(scrollPane, BorderLayout.CENTER)

topPanel.add(btnSelect, BorderLayout.SOUTH)

setVisible(1)

.....

...

method actionPerformed(ae = ActionEvent)

                select

                                when ae.getSource() == quitItem then

                                                System.exit(0)

                                when ae.getSource() == newMarkerItem
then

                                                crumbyApplet()

                                otherwise

                                                do

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20100120/43950c9a/attachment.html
Reply | Threaded
Open this post in threaded view
|

JLabel - Setting the text

Thomas.Schneider.Wien
Hello Mike Measel,
first of all may thanks for your explanation what I will have to do to
get my software
running on an IBM zOS system. And all the URL's you gave.
I will work on this in February ...

Second, I have been *not* on the group IBM-netRexx for the past two
years. For unknown
reson, I have been thrown out, but now I am there again.

My Question:

I would like to BUILD a GUI interface to my packages www.db-123.com
and www.Rexx2Nrx.com.

Where do I have to start reading how to use SCRRENS in Java ?
Should I use SWING, or what would you there, with your insight, recommend
nowadays.

My intent is to build a GUI interface bot for Rexx2Nrx and DB-123.

What would you recommend?

And what I would have to GOOGLE to get at the proper URL?

Please note, that I am working alone (at home) and do have no chance
to ask any collegues (except the groups where I am a member of).

Your advise will be appreciated...
Thanks in advance,
Tom.
=====================================================
Measel, Mike schrieb:

>
> An example ( parts missing indicated with ??? )
>
> class journalMarkers extends JFrame implements TableModelListener,
> ActionListener
>
> topPanel = JPanel
>
> crumbTable = JTable
>
> scrollPane = JScrollPane
>
> quitItem = JMenuItem('Exit')
>
> newMarkerItem = JMenuItem('New Marker')
>
> ?
>
> ?.
>
> method main( args = String[]) static public
>
> journalMarkers()
>
> method journalMarkers() signals Exception, FileNotFoundException,
> IOException
>
> quitItem.setMnemonic('x')
>
> quitItem.setAccelerator(KeyStroke.getKeyStroke("alt X"))
>
> quitItem.addActionListener(this)
>
> newMarkerItem.addActionListener(this)
>
> menuBar = JMenuBar()
>
> fileMenu = JMenu('File')
>
> fileMenu.setMnemonic('F')
>
> menuBar.add(fileMenu)
>
> fileMenu.add(newMarkerItem)
>
> fileMenu.add(quitItem)
>
> this.setJmenuBar(menuBar)
>
> this.setTitle("Journal entries")
>
> this.setSize(1000,300)
>
> this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
>
> c = this.getContentPane()
>
> c.setLayout(BorderLayout())
>
> topPanel = JPanel()
>
> topPanel.setSize(490, 290)
>
> bl = BorderLayout()
>
> topPanel.setLayout(bl)
>
> topPanel.setBackground(Color.green)
>
> c.add(topPanel)
>
> ?.
>
> ?.
>
> btnSelect = Button("Select");
>
> btnSelect.addActionListener(this)
>
> ?
>
> colnames = String[7]
>
> colnames[0] = 'Name'
>
> colnames[1] = 'Date/Time'
>
> colnames[2] = 'Hosts'
>
> colnames[3] = 'Process'
>
> colnames[4] = 'Agents'
>
> colnames[5] = 'Metrics'
>
> colnames[6] = 'Duration (min)'
>
> aobj = Object[20,7]
>
> n = 0
>
> loop aname over timeSlots
>
> ?.
>
> ?.
>
> crumbTable = JTable(aobj, colnames)
>
> crumbTable.getModel().addTableModelListener(this)
>
> crumbCM = crumbTable.getColumnModel()
>
> crumbCM.getColumn(0).setPreferredWidth(170)
>
> crumbCM.getColumn(1).setPreferredWidth(210)
>
> ?
>
> scrollPane = JScrollPane(crumbTable)
>
> topPanel.add(scrollPane, BorderLayout.CENTER)
>
> topPanel.add(btnSelect, BorderLayout.SOUTH)
>
> setVisible(1)
>
> ?..
>
> ?
>
> method actionPerformed(ae = ActionEvent)
>
> select
>
> when ae.getSource() == quitItem then
>
> System.exit(0)
>
> when ae.getSource() == newMarkerItem then
>
> crumbyApplet()
>
> otherwise
>
> do
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  

Tom. (ths@db-123.com)
12