Keylistener not working for JPanel

If you search this problem, you’ll see that it is asked and has been solved many times. KeyListeners need to be on the focused component to work. One solution is to give your component the focus after first making it focusable. Better by a long shot however is to use Key Bindings. Google the tutorial … Read more

Popup Message boxes

javax.swing.JOptionPane Here is the code to a method I call whenever I want an information box to pop up, it hogs the screen until it is accepted: The first JOptionPane parameter (null in this example) is used to align the dialog. null causes it to center itself on the screen, however any java.awt.Component can be … Read more

What does super.paintComponent(g) do?

What does it do? It prints the component as if you hadn’t overridden the paintComponent method. If you have a background color set for instance, this is typically painted by the class you’re extending. When do we need to use it? You use it if you don’t paint on the entire component. The parts that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)