Want to show firework in swing panel, here it is a way to show something like above picture in java swing. It is done by extending JPanel class and overriding its paintComponent method. To know what it exactly looks like, give it a try and run once. Let me know your feedback. 🙂 And here is how … Continue reading Fireworks in swing
Tag: swing
Different button shapes in swing
Make a class that extends JButton and in its constructor write following [Following code is common for all shapes]: Round [Circular] buttons: Triangle buttons: Oval buttons: RoundRect buttons Star buttons: Just change the first argument of makeStarDesign to number of arrows you want in star and it will try to draw it for you. 🙂 … Continue reading Different button shapes in swing