I am currently writing a gui program which has the following classes.
class 1
which contructs the GUI (menubar, jtoolbar, Jlabels etc..) using several
methods.
one of these methods is the following.
method createlabels
jp = JPanel()
jp.setLayout( GridLayout( 1,0,0,50) )
jl = JLabel( filesselected, JLabel.LEFT )
jl2 = JLabel( totalfiles, JLabel.LEFT )
jp.add( jl, BorderLayout.EAST )
jp.add( jl2,BorderLayout.CENTER )
class 2 implements ActionListener
which implements actionlistener and takes care of the menubar & jtoolbar
selections.
class OptionSelected implements ActionListener
properties inheritable
comp = String
opt = String
method actionPerformed( e = ActionEvent )
select
when opt = "New" then jl.setText( opt )
when opt = "Open" then jl.setText( opt )
Otherwise
exit 0
end
When compiling said program the following error message appears,
Error: The method jl.setText( java.lang.string ) cannot be found in class 2
or super class.
I understand what this means but how can I change the text of a JLabel (jl
in this case) when a selection (as above) is made.
Any help is appreciated
Thanks,
Quique
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>