-
Replied To a Post in save as dialog
The info you need is in the Oracle tutorials [here](http://docs.oracle.com/javase/tutorial/essential/io/charstreams.html) -
Replied To a Post in HangMan
If you load it as an Image you can use getScaledInstace to re-size it before converting to ImageIcon, but the reuslts may not be great. Better to do it in … -
Replied To a Post in Need help please
Maybe 90% of the people who get help here are beginners. But we do expect people to show some initiative and put in some work if they expect us to … -
Replied To a Post in Need help please
I just googled algorithm BST infix to postfix and immediately got a whole load of tutorials and samples. Start with those and come back here if you get stuck -
Replied To a Post in Need help please
You could start with Google. There are many sites with tutorials on the theory and implementation. You can't expect someone here to write a new one just for you! -
Replied To a Post in Need help please
Yes, many people here have done projects in that area. Hoever, DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some … -
Replied To a Post in HangMan
Counting the number of wrong guesses is part of the game definition, so it belongs in the model. You'll need a getWrongGuesses() method to return that value so the GUI … -
Replied To a Post in Adding handlers to buttons created with for loop
The idea is that you have a class of ButtonHandlers, but you create a new instance for each button. The ButtonHandler has an instance variable for the number that its … -
Replied To a Post in HangMan
Yes, all that sample pseudo-code is in the actionPerfomed that is called every time the user enters a letter. -
Replied To a Post in HangMan
With Swing you automatically are multi-threaded. There's always the thread your main runs on, and the Swing thread where all the mouse clicks, keyboard entry,a nd all your listeners are … -
Replied To a Post in HangMan
Without the whole code it's very hard to see where an NPE starts from. -
Replied To a Post in HangMan
MVC! Separate the GUI from the game logic as much as possible. Store everything in the game logic, and provide accessors for any user interface (console, GUI, HTML etc) to … -
Replied To a Post in Create a BankAccount class that has the following:
Yes, you can use `double` variables if there are decimal places in the data. -
Replied To a Post in Reading a txt, doesn't work correctly
You can't just print an array by saying System.out.println(myArray); all you get is a coded output like [[Ljava.lang.String;@73a175] that says it's an array of Strings at a particular address (etc) … -
Replied To a Post in VoIP in Java
Yes, provided your directory structure is correct and in the classpath. -
Replied To a Post in VoIP in Java
I don't really know how to make that clearer - can someone else try please? -
Replied To a Post in VoIP in Java
Unless you are doing something clever wuth class loaders, the string "/xxx/yyy.txt" refers to a file xxx.txt in a directory xxx which in turn is *in the classpath*. What may … -
Replied To a Post in VoIP in Java
Just a couple of observations: if you do a project like Sudoku right then the hard stuff is all in a "model" that has no UI. YOu can then stick … -
Replied To a Post in VoIP in Java
According to what you have already posted it's the line System.out.println(is.toString()); `System` and `System.out` won't be null, so it has to be `is` That var is set in the previous … -
Replied To a Post in Need help with arrays and methods..
Yes, sure. I was just explaining a bit more why the double-loop code was so bad. -
Replied To a Post in Need help with arrays and methods..
> System.out.println(" " + num + " is in index "+ j); > should do the trick. ... as long as the trick you want to do is chosing between … -
Replied To a Post in interface in java
Yes, as in my "check your spelling". OP's previous thread was a similar typo, so he should be able to understand a "cannot find symbol" error by now. -
Replied To a Post in Need help with arrays and methods..
I doubt very much that that will help anyone. Sorry, but that code is complete nonsense compared to the original. Did you try executing it? I thought not. Just run … -
Gave Reputation to [NOPE]FOREVER in Need help with arrays and methods..
The outter for loop here is going through the values the user enters until it reaches the length of the array. Then the inner for loop loops through the indexes … -
Replied To a Post in interface in java
> There is already something named Interface! Are you sure? There is a keyword "interface" but that's irrelevant. I don't see anything else called "Interface" -
Replied To a Post in Need help with arrays and methods..
System.out.print(" " +num+ "is in index " + array[i]); You are printing the *value* in array[i], not the *index*. -
Replied To a Post in interface in java
You have been posting here long enough to know that you should give the complete details of any error messages, and explain what symptoms you are seeing. ps CHECK YOUR … -
Replied To a Post in Quicksort using median of 3 or 5
That's a stupid amount of test data for code that isn't working yet. Start with one two or three elements. Add some print statements to your code to see which … -
Replied To a Post in Adding handlers to buttons created with for loop
I agree. If you want keyboard support then key bindings are the best approach. -
Replied To a Post in JOptionPane Error
Yes. There were all kinds of tiny improvements in Java 8 that weren'y big enough to make the press release, for example (one of my favourites)... how many times have … -
Replied To a Post in JOptionPane Error
Slavi: that's the Java 7 version, probably OK, but we should be referring people to the current version of Java (Java 8) unless there's a specific reason not to. [Here](http://docs.oracle.com/javase/8/docs/api/) … -
Replied To a Post in JOptionPane Error
The symbol it can't find is "showMessageDiloge" (see line 4 of the error!) It's because you spelled it wrong. See the API doc for JOptionPane for the correct spelling -
Gave Reputation to Doogledude123 in Java projects for learners
Hey Slavi! Much appreciated that someone thinks what I am doing is pretty cool. So Kudos for that. Heres some more projects. **Number Game** I believe someone posted this here … -
Replied To a Post in Adding handlers to buttons created with for loop
There's a good trick to use here, which is to create a handler that knows which button was pressed - it looks like this: class MyListener implements ActionListener { int … -
Replied To a Post in Object Oriented Programming
Not 100%. "Primitive" types (int, boolean, char , float etc) are not objects. -
Replied To a Post in VoIP in Java
You may find it easier to read that file by simply opening an InputStream directly from the resource, eg InputStream is = getClass().getResourceAsStream("my file path"); -
Replied To a Post in Difference between prefix and post fix operator
Small correction to the above... the increment expression is always evaluated *after* the body of the loop, never "as if though it were the first line of code in the … -
Replied To a Post in VoIP in Java
That's not what I meant First, solve the problem of writing audio to a stream in real time. Just use a file stream because (a) its easy and (b) you … -
Replied To a Post in VoIP in Java
Only because it's not going to be easy, and it's a smart idea to break complex code down and solve one problem at a time. But if you're happy debugging … -
Replied To a Post in Sudoku Solver
> that requires different code which could be broken down a bit, but it would just be more confusing Not really - you can just refactor your existing code to … -
Replied To a Post in VoIP in Java
Good luck! I would start by trying to spool sound to a file in real time, (we know playing it back isn't so hard now). Then you can replace the … -
Replied To a Post in command line argument in java
NO! length is a variable. There is NO length() method for arrays. Mahybe you are confusing it with String, which does have a length() method? -
Replied To a Post in Sudoku Solver
> Obviously I cant just return true in the if statment Yes. Yet another good reason to put that in a method! (You could pass tempRow as a parameter so … -
Replied To a Post in VoIP in Java
SIP (Session INitiation Protocol, or something like that) is a standard way to establish a 2-way "live" link between two machines, and is how standrad VOIP is set up. Skype … -
Replied To a Post in command line argument in java
Arrays are objects, and `length` works just like a `public final` instance variable. The Language Spec says > 10.7 Array Members > The members of an array type are all … -
Replied To a Post in Difference between prefix and post fix operator
In that particular code the i++ or ++i is executed at the end of each iteration and its execution is complete before the next iteration starts and its value is … -
Replied To a Post in command line argument in java
length is like an instance variable that arrays have. It contains the length (size) of the array. In this case it's telling you how many command line arguments there are -
Replied To a Post in VoIP in Java
In theory you shoud be able to capture the mic input stream somehow, then compress it into byte arrays and send those over a socket conection, but honestly I think … -
Replied To a Post in A very simple program but a very irritataing error
Java Strings are made up of chars. A char is a 16 bit number representing a character in UniCode. (Unicode has the same values as ASCII for English letters.) If … -
Replied To a Post in MVC design pattern
From the small amout of info you have given I wuld say yes, that sounds like MVC.
The End.