I want to know if its possible to put a form inside a JLabel using http,
I used the following code:
The label displays the button correctly, and I can click on the button, but, when I click on the button, it throws an exception
because the program tries to cast the JLabel to a javax.swing.JEditorPane
Any ideas? or maybe another way I can use HTML like this?
i know I can use regular buttons, i just want to know if this is possible, because why can you access the form in a JLabel if it doesnt work?
If you need to submit to Google, use a proper JButton with an Action / ActionListener, and use a library like HttpClient for the actual request. Use a SwingWorker to avoid your GUI to hang while performing the HTTP request.