|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Oct 2000
Messaggi: 432
|
[Java] due domandine semplici semplici
Ho da proporvi due domandine semplici semplici ma a cui non so dare una risposta!!!
1) Ho assegnato ad una JButton una immagine ma questa non riempie tutto il bottone. Praticamente intorno ad essa si forma una banda grigia che delimita il bottone . Come faccio a fare in modo che la mia immagine ricompra completamente il mio bottone? 2) Ho definito un' Applet ma non vorrei che sotto di essa comparisse la dicitura 'Applet avviato' come devo fare? grazie mille |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Oct 2000
Città: Montreal (Canada)
Messaggi: 1309
|
Per il bottone prova a giocare con questo metodo:
setMargin public void setMargin(Insets m) Sets space for margin between the button's border and the label. Setting to null will cause the button to use the default margin. The button's default Border object will use this value to create the proper margin. However, if a non-default border is set on the button, it is that Border object's responsibility to create the appropriate margin space (else this property will effectively be ignored). Parameters: m - the space between the border and the label di AbstractButton... Settando gli insets tutti a zero dovresti ottenere quello che desideri... Per quanto riguarda l'applet... non saprei... così a sentimento ti direi che non sia possibile... |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 23:12.