you managed to add a Jbutton to your frame, you add the scrolling text component inexactly the same way, then you change your action listener on your Jbutton to change the text in the scrolling text pane....
as a hack you could change your jbutton1_actionPerformed code to look like this:
Code:void jButton1_actionPerformed(ActionEvent e) { String laString [] = {"message","here"}; ScrollingTextComponent laTest = new ScrollingTextComponent(laString); this.getContentPane().add(laTest, BorderLayout.CENTER); }




Reply With Quote