| | |
scroll text with many link
![]() |
•
•
Join Date: Oct 2009
Posts: 14
Reputation:
Solved Threads: 1
Hi all,
Pls help me .I want to make multile JLabel or JTextField with multiple Link in Marquee.I can do only one.Here is my code
I takes the times for many weeks about that.So Pls help me.Thank in advance.
Pls help me .I want to make multile JLabel or JTextField with multiple Link in Marquee.I can do only one.Here is my code
java Syntax (Toggle Plain Text)
import java.awt.*; import java.io.IOException; import java.util.*; import javax.swing.*; import java.awt.event.*; public class MovingText extends JFrame implements ActionListener{ JLabel label; JLabel label2; JLabel label3; public MovingText() { label = new JLabel( "Hello World,Where there is will there is& nbsp;a way"); //label2 = new JLabel(" ......Testing"); //label3 = new JLabel(label.getText().concat(label2.getText())); getContentPane().add(label, BorderLayout.NORTH); /*label.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { if(evt.getClickCount() > 0){ try { Process pc = Runtime.getRuntime().exec("cmd.exe /c start http://www.iwebie.com"); } catch (IOException ex) { System.out.println(ex.getMessage()); System.out.println(); } } } }); label2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { if(evt.getClickCount() > 0){ try { Process pc = Runtime.getRuntime().exec("cmd.exe /c start http://www.google.com"); } catch (IOException ex) { System.out.println(ex.getMessage()); System.out.println(); } } } });*/ javax.swing.Timer timer = new javax.swing.Timer(100, this); timer.start(); //System.out.println("Label 3 "+label3.getText()); } public void actionPerformed(ActionEvent e) { String oldText = label.getText(); String newText = oldText.substring(1) + oldText.substring(0, 1); label.setText( newText ); } public static void main(String[] args) { MovingText frame = new MovingText(); frame.setDefaultCloseOperation( EXIT_ON_CLOSE ); frame.setSize(300,100); frame.setVisible(true); } }
I takes the times for many weeks about that.So Pls help me.Thank in advance.
Last edited by peter_budo; 20 Days Ago at 5:23 am. Reason: Correcting code tags
![]() |
Similar Threads
- Extremely Cheap Sitewide Text Link on Website Design Related Site (Ad Space for Sale)
- Cheap PR6 Run of Site Text Link (Ad Space for Sale)
- Would you like to exchange text link with downloadline.com? (Relevant Link Exchanges)
- Text link to promote my keyword. (Search Engine Optimization)
- Sweet text link network (Relevant Link Exchanges)
Other Threads in the Java Forum
- Previous Thread: Search array for account number
- Next Thread: creating files with "outfile..." (file can't found!)
| Thread Tools | Search this Thread |
-xlint add android api applet application array arrays automation bi binary blackberry block bluetooth class client code compile compiler component database developmenthelp eclipse equation error event fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide image int integer j2me j2seprojects java javac javaprojects jetbrains jni jpanel jtable julia learningresources lego linux list login loops mac main map method methods mobile myregfun netbeans nonstatic notdisplaying number online pearl problem program programming project qt recursion scanner screen server set singleton sms sort spamblocker sql string swing system textfields thread threads time title tree tutorial-sample update variablebinding windows working xor





