I created a graphical interface in a small program in Java. When you create the fields in the graphical interface, you have automatically created the actionPerformed(java.awt.event.ActionEvent evt) methods, which are automatically private methods. I created a JTextField to receive what the user types. Then I created a string variable, such as: String inputfieldinstring = inputtext.gettext().Tostring(); Then I turned into an
Tag: netbeans
Exception in thread “AWT-EventQueue-0” java.lang.RuntimeException: Uncompilable code – package org.netbeans.lib.awtextra does not exist [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 year ago. Improve this question
Java warning: [options] system modules path not set in conjunction with -source 11
This machine has had multiple version of Java JDK installed and multiple version of multiple IDEs (Netbeans, IntelliJ, Eclipse, etc.) Most recently, I have added JDK 15.0.2 and Netbeans 12.2. When trying to compile a simple “Hello World”, this is the output that results: As you can see, the file compiles and runs, but the warning is causing me concern.
How to create txt file in source package folder sub folder ( source package -> invoice)
I need to create a .txt file in the invoices folder. I am using Windows 10. How can I do that? I’ve tried: and But it did not work. Thank you for your support. Answer As Jens said do not use a project source folder to write the file. At run-time of the standalone application there might not be a
NetBeans 12.0: “Class does not have a main method” (but it does)
NetBeans 12.0 Jdk 15 I cannot launch my program, clicking the green run button doesn’t do anything, and right click + run file on MainFrame gives the error “Class does not have a main method”. But as you can see in the GIF below, it does have a main(String args[]). Does anyone have any idea why this happens? Answer Initial
input arabic characters with scanner in maven project
i work on netbeans 8.2 and i create a java maven project, i want just take an input with arabic characters and display it and that don’t work properly : NOTES: i have already change netbeans configuration (/etc/netbeans.conf) to accept UTF-8 encoding but i have this probleme just with MAVEN projects. Answer Try to run code in other environment. May
Why is my random number generator becoming an unused assignment when using it to input values for 2d array?
I have been making a basic game of battleship and to get the CPU to choose ship locations on a 2d array I am making two random number generators to pick values from 1 to 8 on a separate method. For some reason, the random generators show up as unused and I don’t know why. so far this is what
How to calculate time difference using h format Java Netbeans
I am currently experimenting with a Self-Check in Airport Project. What I would like to do is enter the Time of Departure using the format (hour)h(minute) Example(14h40) I would have to validate this, by checking if the hour value is less than or equal to 23 and the minutes value is less than or equal to 59. If this is
Problem at calling a constructor if the java class is in a different path
I want to save the java classes in a folder called Classes, so on NetBeans, I have created that folder, and then I have saved it the class called Jugadores.java but after doing that i am having issues to call my constructor called regisPlayer on the main class. NetBeans says that: cannot find the simbol symbol:class regisPlayer location: class Obligatorio
How to Insert Data To Array
I want to save a “AromaNorm” into NormalisasiT1 array, but i had a error : AWT-EventQueue-0 java.lang.NullPointerException Can you help me? Here the Code Answer you should initialize the array the array is null so it throws NPE.