1
간단한 문제이지만 왜 작동하지 않는 지 잘 모릅니다. 이전에 나는 똑같이 해왔고 항상 효과가 있었지만 지금은 내가하는 일을하지 않습니다. bgImage를 설정했지만 어떻게 든 작동하지 않습니다. "group"이라는 이미지를 Button으로 설정하면 munuIcon1 = new Button (그룹)으로 동작합니다. 그러나 다음은배경으로 이미지 설정이 작동하지 않습니다.
Image group = theme.getImage("group.png").scaledWidth(imgWidth/3 - 10);
Button menuIcon1 = new Button();
menuIcon1.setUIID("menuButtonzz");
menuIcon1.setPreferredSize(new Dimension(150,150));
menuIcon1.getUnselectedStyle().setBgImage(group);//tried getAllStyles() too
//tried couple of things but doesn't work
menuIcon1.getAllStyles().setBackgroundType(Style.BACKGROUND_IMAGE_SCALED);
menuIcon1.getAllStyles().setBgTransparency(255);//tried value to 0 as well