Już coś na tym forum było na temat wskażników ale mi chodzi coś takiego:
import Something;
import javax.swing.*;
public class Main extends JFrame
{
Main()
{
//To co zwykle...
}
public static void main(String args[])
{
Main w = new Main();
JButton b = new JButton(); // i to co zwykle do JButtona...
w.add(b);
Something s = new Something(w);
}}
No i:
import javax.swing.*;
import java.awt.*;
public class Something extends JButton
{
Something(Wskażnik_do_JFrame ws)
{
setSize(ws.getWidth(),ws.getHeigh()); //Użycie wskżnika
setVisible(true);
setLocation(0,0);
setBackground(Color.blue);
}}