Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package prophet;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import javax.swing.JLabel;
- public class tred implements Runnable{
- JLabel baner;
- public tred(JLabel tredara){
- this.baner = tredara;
- }
- @Override
- public void run() {
- while(true){
- String reklama = "Reklamica";
- for(int i = 0; i < reklama.length(); i++){
- this.baner.setText(reklama.substring(0, Math.min(reklama.length(), i+1)));
- try {
- Thread.sleep(250);
- } catch (InterruptedException ex) {
- Logger.getLogger(tred.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement