Skip to content

Instantly share code, notes, and snippets.

@Cherubi
Created June 10, 2012 22:47
Show Gist options
  • Save Cherubi/2907576 to your computer and use it in GitHub Desktop.
Save Cherubi/2907576 to your computer and use it in GitHub Desktop.
näkyvyysratkaisu
package nopeustesti;
import java.awt.Graphics;
import javax.swing.JButton;
public class Nappula extends JButton {
public Nappula(String teksti) {
super(teksti);
}
@Override
public void paintComponent(Graphics g) {
g.setColor(getBackground());
g.fillOval(0, 0, getWidth(), getHeight());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment