How can i create a Light Glow effect when hover on JButton?
When i put my cursor on JButton It shoukd give a glow or spotlight you can say?
How can i do it?
I'm trying to create an app a filthy rich one and i want this effect in my program.
Please Help.
Light Glow effect on JButton
Page 1 of 17 Replies - 5968 Views - Last Post: 26 January 2014 - 02:03 PM
Replies To: Light Glow effect on JButton
#3
Re: Light Glow effect on JButton
Posted 26 January 2014 - 07:20 AM
Bro How can i implement it can i please get a simple example code?
#5
Re: Light Glow effect on JButton
Posted 26 January 2014 - 08:22 AM
In the Example the author is using some package, which is unavailable to me.
Plus the example is incomplete.
Reason: Some pages are omitted from the book.
Plus the example is incomplete.
Reason: Some pages are omitted from the book.
#6
Re: Light Glow effect on JButton
Posted 26 January 2014 - 08:56 AM
The essential code you need is on that page, but if you are not able to understand and adopt it then you'll have to keep searching for something you can copy and paste.
#7
Re: Light Glow effect on JButton
Posted 26 January 2014 - 09:04 AM
I'm Not searching something to copy paste, instead i'm looking for something understandable to me.
#8
Re: Light Glow effect on JButton
Posted 26 January 2014 - 02:03 PM
I've tried adding nimbus laf to it. Although Nimbus gives my button a bit glow but that's not what i want.
I want some light on it.
Here is my code
I want some light on it.
Here is my code
import javax.swing.*;
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
public class Button{
private static JFrame f=new JFrame("Glowing Button");
private JButton b=new JButton("Glow");
Button(){
f.setSize(600,600);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLayout(null);
b.setBounds(200,150,200,200);
b.setOpaque(true);
f.add(B)/>;
f.setVisible(true);
}
public static void main(String args[]){
try {
UIManager.setLookAndFeel(new NimbusLookAndFeel());
SwingUtilities.updateComponentTreeUI(f);
} catch(Exception e) {
e.printStackTrace();
}
new Button();
}
}
Page 1 of 1

New Topic/Question
Reply


MultiQuote


|