Unfortunately, Dr.Java doesn't provide very detailed errors. Due to the line spacing, the only effective way for us to suggest how to fix your code would be to copy and paste it into an IDE.
Your...
Type: Posts; User: SunshineInABag
Unfortunately, Dr.Java doesn't provide very detailed errors. Due to the line spacing, the only effective way for us to suggest how to fix your code would be to copy and paste it into an IDE.
Your...
Your AddNumber class interacts with the console, so it doesn't matter where it is called, it will do just that. You're on the right path though for making your JTextArea resemble a console. Before...
You have a variety of options for taking in user input via a GUI. I'll list out a few but keep in mind, there are others I'm not mentioning:
1) Create a JOptionPane.showInputDialog(null,...
Are there any errors that appear? There are a few problems I see. First, in your statement, you're only specifying a table name but not the database where that table can be found. Instead, try SELECT...
When you refer to updating or deleting content, do you mean that you want the program to write (and later read) from an external file, where each student ID is on a separate line or separated by a...
No offence but, how is it you can write your own methods, use static, return statements and single-dimension arrays, yet don't know how to call them? Use whatever source(s) you're studying or...
Since it is not entering the if-statement of if(!inputFile.exists()), the representation of the file or the file itself exists. It's now a matter of figuring out what the compiler thinks the file...
This if-statement will return true if a + c > b is false OR b is divisible by 3 without a remainder. The only time it will not return true is if a + c > b is true and b is not divisible by 3.
...
Most layout managers try to ensure each JComponent is side-by-side or some other arrangement other than overlapping. However, there are a few that rely on overlapping, such as CardLayout (not sure if...
What have you tried to code each of the 4 additional features of a help option, setParams option, FillArray option and DisplayResults option? I'll give a very rough outline of the logic and you may...
Since all the methods are static, you just need to call them without creating an instance of the class and make sure you assign a variable that is of the same data type as the return (for your...
I'm a bit confused, are you trying to get the buttons to have that overall appearance but function as 1 button OR are you trying to get 2 buttons with different functions/roles overlap each other?
...
Can you post the code so we can see what happens or make a SSCCE? It could possibly be the layout that you have chosen. If you want to have more control over the layout, try GridBagLayout.
Your if-statement is insanely large and impractical, especially if you want to compare more words. Instead, use another array or an arraylist, such as:
public class TestSentence {
public...
Multidimensional arrays can have any number of dimensions to them, from int[][] to int[][][][]. I understand how a multidimensional array with 2, 3 and 4 dimensions can be used practically but what...
Open a fully functional java program and use it as a checklist to see what the code needs to be functional. So far, you've identified there has to be a ; at the end, a class and a method (either a...
Can you post the contents of the .rar because many people (myself included) will not open a .rar for security reasons. You can use only the 1 JFrame you have and place the contents of the other...
It may not be causing a problem right now but have you tried using hasNext() instead of hasNextLine() as the latter may return true even if there is nothing in the next line.
As for your actual...
There are a few ways to achieve what you want but without seeing the entire code, it's impossible to know why your program is behaving the way it is. One way is to use 1 JFrame and use a Layout...
Try replacing the == with equals(searchKey), that should fix the problem. If you don't care whether letters are upper or lower case, you can instead use equalsIgnoreCase(searchKey).
Your Supplier class does not have the method getItemNumber().
Easiest way that you can do in 1 chained line or a few lines is to first keep jtf.Message.getText() as that retrieves and represents the value as a String object. To get that into a primitive int,...
There are many on YouTube, such as:
Brandonio Productions - YouTube
thenewboston - YouTube
In terms of compilers, there are numerous different ones and any one should suffice your needs. The...
When I write GUI code, I follow a specific layout of how I arrange my code. There are different ways of placing the event-listener code in the GUI, so feel free to use a different way if you wish....
If you already submitted your assignment, it's too late to add this but for future reference, your main method contains "throws IOException" but no where in the method do you use either a...