tags:

views:

8

answers:

1

i have a JTextField with background image. if we disable this textfield it is not looking like disabled because of image, so i want to apply another image which is in disabled mode.

it's working fine but when we maximize a my window(frame) it's not repaiting my components.

please advice

A: 

please find following code

public class AssetMetaData extends JPanel{

JTextFiled songTitletextField = null;

public AssetMetaData(PlayList playList) {

initComponents();
}

private void initComponents() {

songTitletextField = new JTextFiled ();

add(new ImageTextFiled(songTitletextField)));

// this will add an background image for this textfiled

......... ...... }

}

i have scenario where i need to disable the this textfiled like

public void toggleCharacteristicFields(boolean enable) {

songTitletextField.setEnabled(false); add(new DisableImageTextFiled(songTitletextField)));

}

but because of image , we can't identify whenther it was disable ot not

so i have applied another image which is in disable mode. like above

it's working fine but when we Minimize / Maximize a window it is not painting when move mouse to perticuler textfield then it is painting .

regards Narasimha

Narasimha