Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MARATHON GUI testing

 
janleva m chandra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I truied to use marathon tool with swing example. but i am not able to configure for my application.
Could you pls help me to configure my application with MARATHON.
I have a simple java class file which have two button. I want to exicute this class and record for button click. when recording coplited then i want to re-play the same and it should be run for N number of times. if some one help me for this then it would be great help for me.
Thanx
-------------------------------------
Code:
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.beans.*; //Property change stuff
import javax.swing.*;
import javax.swing.border.Border;
public class Client extends JDialog implements ActionListener{
public static int okCounter=1;
public static int cancelCounter=1;

public Client() {
JButton okButton = new JButton("OK");
okButton.setActionCommand("OK");
okButton.addActionListener(this);
JButton cancelButton = new JButton("CANCEL");
cancelButton.setActionCommand("CANCEL");
cancelButton.addActionListener(this);
JPanel lowerPanel = new JPanel();
lowerPanel.add(okButton, BorderLayout.EAST);
lowerPanel.add(cancelButton, BorderLayout.WEST);
getContentPane().add(lowerPanel, BorderLayout.CENTER);
getContentPane().setVisible(true);
getContentPane().setSize(new Dimension(350,350));
}
public static void main(String[] args){
Client cp = new Client();
cp.setSize(new Dimension(350,350));
cp.setVisible(true);
}
public void actionPerformed(ActionEvent e){
if(e.getActionCommand().equals("OK")){
System.out.println("OK Button Click="+okCounter);
okCounter++;
}
if(e.getActionCommand().equals("CANCEL")){
System.out.println("Cancel Button Click="+cancelCounter);
cancelCounter++;
}
}

}
[ July 22, 2003: Message edited by: janleva m chandra ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What problems do you face?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic