PDA

View Full Version : [Java]:si può creare un backround trasparente?


jim86
29-07-2006, 14:52
ciao....ho un problema...dovrei mettere lo sfondo di un pulsante e di una JTextarea trasparente...cioè il testo scritto al loro interno deve essere lo stesso di quello del resto della finestra...come faccio?
grazie a tutti

MEMon
29-07-2006, 15:04
Ciao compaesano :D

Puoi fare JComponent.setOpaque(false); e li rendi trasparenti, per i pulsanti è più brigoso e penso non basti fare così, ora però sinceramente non mi ricordo come si faccia se lo trovo te lo posto.

MEMon
29-07-2006, 15:11
Se con solo setOpaque(false) non diventa trasprente il JButton prova ad usare anche questi:
button.setOpaque(false);
button.setBorderPainted(false);
button.setFocusPainted(false);
button.setContentAreaFilled(false);

Ciao

jim86
29-07-2006, 15:46
ok grazie mille per l'aiuto

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.