Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
When I close to "Gelir Ekleme Alanı" then the main page close too. What am I doing for avoid this problem. It is my school homework and I must solve the problem.
enter image description here
I guess that you are in your JFrame saying something like
GelirEklemeAlanıFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
which makes the JFrame execute
System.exit(0);
when you press the red X which closes your whole application. But as you just want to close the window you have to change it to
GelirEklemeAlanıFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
which just closes this frame or create a custom exitListener. If you want to make a custom exitListener to add some extra behaviors on exit, just look up on the internet for "exitListener in java swing" or JFrame.
Hope I helped you :) Good luck in school!
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
when key relese from the red marked area add new row.
First of all use a proper image description...
To your question: You can see the answer in your picture. You just have to edit the tablemodel (right side at the bottom). There you can insert a new row or a new column and put some test data into the table.
If you want to learn swing I wouldn't recommend to start with the GUI designer. Yes it's a very useful tool and probably the best GUI designer for Java atm but the downside is that you don´t learn the basics of swing with that.
I would recommend to create some JFrames first via coding them by yourself and by recreating some good examples like this one: https://examples.javacodegeeks.com/desktop-java/swing/jframe/java-jframe-example/
or this:
https://docs.oracle.com/javase/tutorial/uiswing/learn/index.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Does anyone have any suggestions as to how I can go about creating an Effect for a JavaFX node that can simulate glass shattering and then (potentially) breaking? if the breaking is more difficult, I can skip that part. Basically I want to layer this pane over an image and then make it look like its a picture frame that then shatters. If it can then break into pieces (after some configurable delay).. that would be great as well!
I've looked everywhere but can't seem to find info on simulating the glass shatter effect in JavaFX.
Thanks!
For a simple solution I'd go with a Path that randomly extends and change the style of the path during time.
More sophisticated code could use a Canvas and paint the shattering on it. Daniel Shiffman with his Nature of Code book may be a base for you with the creation of the shatter effect.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am trying to add a kind of label when the mouse touches a button, I used Jlabel but i failed to create it.
Can you help me?
Use setToolTipText with Button.
button.setToolTipText("Click me");
Look at this tutorial.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am a very new programmer, it is part of my degree requirements and I am having a hard time with it. I am working on basically a three part GUI and I am wondering how I would create a JTextArea that will display each item that is entered.
Start by taking a look at Creating a GUI With JFC/Swing, this will give you a basic grounding in how to use Swing.
Take a closer look at How to Use Text Areas for specific details about how to use JTextArea
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm currently making a mortgage calculator, but I need some help. I have a reset button on my GUI that makes all of the forms blank again after typing something into them. The IDE already helped me make the button, so here is where I'm at:
private void resetActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
What do I need to put in here?
You either recreate your complete GUI (probably not an option), or painstakingly use .setText("") against each and every input field you have, and similar logic for radio buttons, etc. There's no royal way to it, unfortunately.