JButton (2) 썸네일형 리스트형 Java Technology Forums - Changin JButton Icons via action performed 버튼에 대한 액션이 생기면 그에 따른 변화( 현재 이 코드에선 버튼의 이미지를 변화 시키기 위한 것 )가 안된다고 하기에 올려진 문의와 답변입니다. 문의내용 Hi, I have been fiddling with this for some time with no result I was wondering if anyone could tell me how to do this Basically I have an action listener in another class that is supposed to change the colour of the buttons when it is pressed, below is the code for the action performed method. I have tried r.. JBUTTON 내부의 텍스트를 회전 하기 위한 방법 JButton 내부에 사용되는 텍스트를 회전해야 하는 경우에 사용 할 수 있는 방법입니다. 실제 사용시엔 폰트의 크기, 폰트 정령방법등과 같은 글자의 위치 변화를 신경 써야 합니다. import java.awt.Font; import javax.swing.JButton; public class RotateTextAtJButton { JButton button1; java.awt.geom.AffineTransform rotate; private void Rotation() { button1.setBorder(new javax.swing.border.EmptyBorder(40,4,40,4)); button1.setText("Text" ); double theta = (0.45) * Math.PI; // ==.. 이전 1 다음