how to delete a simple jbutton
已回答
how to delete a simple jbutton on the jframe with kotlin swing,
my keyboard does not have the 'Delete' key!
does not have the option to exclude things either by the Form or by the component tree, it is incredible that it does not have this basic functionality, and when I add a jbutton to my form a jpanel appears but before I had already added a jpanel
请先登录再写评论。
If you're using Swing UI designer you can right-click on UI component and select
Cut. It looks like there is no separate action for removing components but we have an open request at https://youtrack.jetbrains.com/issue/IDEA-33749 .Egor Klepikov when I run my project, this error
Try to place your java sources into java directory and rebuild the project:
thanks Egor Klepikov , but ta giving this error :.(
I think ide could make these basic folders, I'm taking a course but about kotlin and swing
Try to select Java source code option in File | Settings | Editor | GUI Designer section as suggested in threads https://stackoverflow.com/a/26143126/12844632.
I decided by recreating the project and letting the ideal make the build, not the 'kotlin / gradle' I didn't test if 'groovy gradle' would give problems.
But thanks for the support Egor Klepikov, and I hope that in the near future it will be simpler to do a swing project in intellij with kotlin and gradle!
During one of my PHP projects last year, I had to add and remove some components dynamically. Since it was on PHP, I had used jQuery for that purpose. I’m currently working on bringing that project over to Java. The first thing that I looked up on Google was creating dynamic variable names because I need it specifically for that purpose. The answer is a big NO. So, here’s a simple way of adding and removing components dynamically from JPanel in Java.