0

I've already learned that Swing forms are compiled into some kind of binary files per default using the IntelliJ IDEA.

In order to get a standalone runnable JAR someone needs to change this mode into "Generate GUI into: Java source code".

To be honest, I like the clean way IntelliJ is managing the code of the form. I know how to program Swing code on my own but

  1. it doesn't make fun to me
  2. therefore I like the GUI designer
  3. I would prefer the code somewhere outside of my focus.

Now I come to my question:

Can I somehow run my app outside of the IDE w/o activate the setting to "Generate GUI into: Java source code"?

I don't need a single packed JAR file. It would be totally fine e.g. to have all necessary files together to achieve this by keeping the benefit (yes for me it is one) of clean code.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
PIC-Nico
  • 49
  • 9
  • 1
    While I'm not a fan of using GUI designers, I'm pretty sure IntelliJ allows the 'best of all worlds' by allowing you to generate a Jar, then go back to the original GUI designer. It wouldn't make much sense if it didn't. Try playing around with it using a new, simple code (e.g. a single `JLabel` in a `JFrame`). – Andrew Thompson Mar 05 '21 at 05:56
  • To say use the GUI designer, switch to generate source code (if I need to deploy) and go back to "binary mode" afterwards? Yes I already tried this way, it works. – PIC-Nico Mar 05 '21 at 06:10
  • The use of 'already' confuses me. Was that 'already before asking the question' or 'already since my comment'? If the first one, I have to say I completely don't understand the question. If the second .. you're welcome. – Andrew Thompson Mar 05 '21 at 06:18
  • Let me elaborate: I know about the setting (as mentioned also in my question). But I also mentioned that I would like to stay on the (default) binary setting and have a runnable app outside of the IDE. So my question is pretty clear I would say?! – PIC-Nico Mar 05 '21 at 06:21
  • What is incomprehensible about: "Can I somehow run my app outside of the IDE w/o activate the setting to "Generate GUI into: Java source code"?" Please help me clear up any ambiguity :-) – PIC-Nico Mar 05 '21 at 06:30
  • *"my question is pretty clear I would say?! "* .. not to me. But perhaps that is because I'm not a user of IntelliJ. To be honest, I really should leave **all** questions about IDEs to others. I'll start doing that now. Best of luck wit it. – Andrew Thompson Mar 05 '21 at 06:30
  • Oh okay, thx anyway! – PIC-Nico Mar 05 '21 at 06:34
  • If I'm not mistaken, [IntelliJ IDEA GUI Designer](https://www.jetbrains.com/help/idea/gui-designer.html) incorporates [JFormDesigner](https://www.formdev.com/jformdesigner/) which generates `.form` files. I'll assume that you are asking how to incorporate those `.form` files into a Java application that can be run outside of the _IntelliJ IDEA_ IDE. I understand from this [question](https://stackoverflow.com/questions/2919291/how-to-generate-form-file-in-java-swing) that it is not really possible. It looks like you have to use _Generate GUI into: Java source code_ – Abra Mar 05 '21 at 06:56

0 Answers0