I have a JFrame, one of the buttons has to pass the frame it self as a parent, i would have used the this keyword, but it's returning the actionlistener, instead of the JFrame. Is there a workaround or am I writing badly?
The code:
start.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
kMeans=new KMeans(mainWindow.table, Integer.parseInt(centroids.getText()),this);
}
});