Wait, the mkay class extends the JFrame, so that s the other wiindow, right?
The code works if you dont create another frame inside the mkay class.
--Thanks for helping me
Type: Posts; User: sbjibo
Wait, the mkay class extends the JFrame, so that s the other wiindow, right?
The code works if you dont create another frame inside the mkay class.
--Thanks for helping me
I think thats the only line where the window is created. Could you tell me where is the other window being created?
It is created at line 20 of my program. The title of the window is "Which button Demo"
I dont understand why two windows are created. When I say 'mkay app = new mkay(), that should make a window. So where is the other window coming from?
Does the fact that I made it in 'Ready To Program' matter ? because my friend made a code simililar to this in netbeans, and it worked.
When you write app.setVisible(true), it creates a new window, but it has no components. its just an empty frame.
When you execute the program, a frame with a text field, and 2 buttons labeled button1 and button 2.
But the program is not supposed to show anything
Here is a code I made to practice how to make JFrame and add components to it.
But the problem is:
1. On line 8, shouldn't the frame turn invisible?
2. On line 7, shouldn't the frame be in the...
String mess = "Hello".
I want to use JOptionPane.ShowInputDialog and if the user presses backspace, the code is supposed to remove the last letter of 'mess'.
But I have NO IDEA how to use...
i figured it out: When you type this
words [g] = swaplow (words [g], words [g + 1]);
words [g + 1] = swaphigh (words [g], words [g + 1]);
you have type this in its...
it still gives exceptions
for (; count < word1.length() ; count++)
{
if (word1.charAt (count) > word2.charAt (count))
{
index = word1;
break;
}...
And to compile, you can use the Scanner method intead of console. But you have to modify the code a bit
It is like a bubble sort. you switch the position of 2 consecutive items in the array. And you loop it for the number of elements the array has. The 'h' variable is to keep track of how many more...
Ya i know. It tells the users to enter the words with the same length
This is a program where the user types a bunch of words and then the program rearranges them into alphabetical order and then prints them.
But this code keeps crashing on line 35 at "for (int count...
I figured out the problem. After the highest number is deleted, you have to set 'highest' equal to the second highest or the lowest number. or else no number will be removed from the list.
Ok so this is a program where the user inputs a bunch of numbers and the program finds the nth highest number from the list, the nth number is specified by the user.
This program works like this:...