简体   繁体   English

单击复选框时打印文本

[英]Printing the text when checkbox is clicked

I have a doubt regarding Swing application. 我对Swing应用程序有疑问。 In this image, if the check box is checked and next button is clicked, it need to show the printed text in the next frame as "enter the movie name". 在此图像中,如果选中该复选框并单击下一步按钮,则需要在下一帧中将打印的文本显示为“输入电影名称”。 Could anyone please help me with this? 有人可以帮我吗?

Code: 码:

private void nextActionPerformed(java.awt.event.ActionEvent evt){


 if (movie.isSelected()== true ){

    // code 

 }
else

{
    // code

  }

}

What code I need to write to show the text as "enter the movie name:______" in the same window when next button is clicked 单击下一步按钮时,我需要编写什么代码才能在同一窗口中将文本显示为“输入电影名称:______”
Image: 图片:

这里

In this panel you can make a textfield invisible. 在此面板中,您可以使文本字段不可见。 When you clicked button the textfield will enable for input Movie name 当您单击按钮时,文本字段将启用输入电影名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM