Some IntelliJ questions (Git, GUI, Keyboard, Maven and the JDK/SDK)
Hey Guys,
I have a few questions because I have some problems. There are a few questions but no long questions!
1. How can I disable the "Can't start Git: git.exe" popup? (right corner in the screen)
2. If I want to edit the GUI again I get this error? - Just a few hours I could work with it, but now not? - I dind't changed anything! JDK and SDK are still in!
3. Sometimes I have crazy keyboard... For example I press backspace but nothing happens... I need to delete text with the "Entf" taste... Also to mark something with the mouse is very complicated sometime? - How can I reset those settings? - All shortcuts are set to the IDE and not the VIM!
4. How can I import Maven to my Project? - If I go to "Project Structre" -> Modules -> Add -> I can't klick Framework...
5. Is there a way to exchange the jre liberay in the IntelliJ installation folder? - I want to import my own version!
That's all! - I hope somebody will help me!
Thanks!
请先登录再写评论。
1. Configure git executable or disable git mapping for this project in Settings | Version Control.
2. It's not an error, just an inspection warning. Can be disabled in inspection settings.
3. Disable IdeaVim plug-in if you have it installed, otherwise just switch to the default keymap, attach idea.log if it doesn't help (https://intellij-support.jetbrains.com/hc/articles/207241085).
4. Project Structure | Modules, +, Import Module, point to pom.xml. If the whole project is Maven based, just Open the root pom.xml file and IDE will import it.
5. https://intellij-support.jetbrains.com/hc/articles/206544879
THANK YOU A LOT!
But I have still ONE error... I have still the XML Version of the GUI form... But no warnings!
How can I switch to the designer?
Close the file an open it again.
Thank you! - But I got a new error...
Where ist the problem? - The path set right!
Please see the sample project from https://intellij-support.jetbrains.com/hc/en-us/community/posts/206764429-How-to-get-multiple-GUI-froms-.
Your code is missing createUIComponents() method shown on my screenshot in the last message.
Ok, thank you! Problem solved! - But I have still one error...
Please attach a sample project that will reproduce the problem.
Just take those files: https://www.dropbox.com/sh/xnehat2d9fypjjw/AADAeIMQtFUnm2FsLNlfTQ4ua?dl=0
Same error
Error:forms: C:\Users\Jan\AndroidStudioProjects\Guessit\test\src\registerPanel.form: Cannot bind: field does not exist: registerPanel.cancel
The bound class is missing cancel field for JButton, you can add it via intention action from the form. As you can see, IDE has highlighted the problem and suggested to add a field via the light bulb intention action:
Ok, nice! - Now I got a last problem...
Exception in thread "main" java.lang.NullPointerException
at de.bg12.quizduell.client.ui.registerPanel.$$$setupUI$$$(registerPanel.java)
at de.bg12.quizduell.client.ui.registerPanel.<init>(registerPanel.java:30)
at de.bg12.quizduell.client.ui.GraphicalUI.createUIComponents(GraphicalUI.java:77)
at de.bg12.quizduell.client.ui.GraphicalUI.$$$setupUI$$$(GraphicalUI.java)
at de.bg12.quizduell.client.ui.GraphicalUI.<init>(GraphicalUI.java:46)
at de.bg12.quizduell.client.ui.GraphicalUI.main(GraphicalUI.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Why your methode to get the rootPanel dosen't work?
Custom create option must be used only for the panel in the main form, not in the form you insert into your main form. Please study the sample that I've provided you before. Main form contains the empty JPanel that has custom create option set and is initialized inside createUIComponents() with the panel obtained from another form.
In your example you have custom create option in registerPanel form which is wrong.
I recommend you to learn from the example I sent you before to understand how it works and start experimenting with that example.
Also, you can't use custom create for the root panel of the main form, otherwise you will get NPE in
You need to have empty JPanel somewhere below the root node that will be initialized with custom create option.
I don't know what you are trying to do, but here is the example that is replacing part of your GraphicalUI form with the registerPanel:
https://dl.dropboxusercontent.com/u/2752840/guiapp.zip
I hope you will be able to figure out the rest from these 2 sample projects.
Ahhh okay, I understood!
I want to exchange to completely rootPane in the main with e.g. the registerScreen or other screens and not only the loginData Panel in the rootPanel from the main class. Is that possible?
And all that should happen by an event like a button ...
You need to have at least one panel lower than the root (wrap components into it). You can't replace the root panel, but a parent one level lower.
To switch panels at runtime on event you can use CardLayout as I've already suggested in another thread: https://docs.oracle.com/javase/tutorial/uiswing/layout/card.html.
Hey Serge,
Since the 25th of may I'm trying to exchange the content panels. As you said I unchecked the custom create button in the rootPanel and set a sub panel which i called exchangePanel. In the exchangePanel the custom create buttin is checked,
I also looked up the CardLayout here https://docs.oracle.com/javase/tutorial/uiswing/layout/card.html as you said, but I want to use the GridLayout. Because it is easier for me!
I also know now how to exhange panels in your example which you called "guiapp". But the problem is, if the gui starts it is exchaning the panels. But I want to exchange the panels only if I click the button "Registrieren".
And if the Button is pressed, I only want to tsee the registerPanel and not still the buttonPanel or the welcomeMessage Panel from the GrapficalUI.
I thought, I can save the rootPanel from the registerPanel.form and set it with frame.setContentPanel()... Is this possible?
How can I do that? - Here is my source code:
https://www.dropbox.com/sh/xnehat2d9fypjjw/AADAeIMQtFUnm2FsLNlfTQ4ua?dl=0
THANK YOU!
You need to use CardLayout for on-the-fly panel switching.
I found a solution?
Look at this: https://www.dropbox.com/sh/el9yizigwlsj6rf/AABZE7GlPDDAH-LzkE_y5v1pa?dl=0
But why I get a "black screen", if i press the button "Abbrechen", after you pressed the button "regestrieren" in the JPanel?
Thank you. That helped me too.