-
Replied To a Post in Extract data from JOptionPane
Have you tried calling getText() for your two JTextFields after the dialog has finished? The simple pre-packaged dialogs in JOptionPane are just that - simple. The assumption for inputDialog is … -
Gave Reputation to stultuske in Extract data from JOptionPane
Start4me: if that error message is to difficult to solve, you should stop working with JOptionPane, and start at the beginning. first learn about primitive types, then about Objects, then … -
Replied To a Post in Language for messenger
Depends on the platform... C# if Windows only Swift if Apple only Java if Linux or multi-platform -
Replied To a Post in Errors
Before Java 5 arraylists just contained any kind of objects. Java 5 allowed you to specify exactly what kind of objects a list can contain, which prevents a lot of … -
Replied To a Post in Difference between bufferedReader and inputStream
Because there are two different wrapping processes going on. First you wrap the byte-oriented input stream in a character-oriented `Reader`, then you buffer those characters in a `Buffered` stream -
Replied To a Post in How to give input to a Thread from GUI
Yes it will work. The listener/send is executed on the Swing thread, so it could run concurrently with your receive thread receiving data from the server. That's why it would … -
Replied To a Post in invoice class
There are two ways to approach this: Create a new "empty" object using a default constructor, then call its set methods to populate all its data (no need to call … -
Replied To a Post in Difference between bufferedReader and inputStream
Another way to explain it: ByteArrayInputStream, FileInputStream etc give you access to the raw bytes, one at a time, in the source array/file/whatever. These are lowest-level way to access the … -
Replied To a Post in Have I applied this 3-layer design pattern properly?
Yes MVC is a three-tier arch, but it's not the only one. When I say "data model" I'm referring to a convenient representation of the real-world domain - classes like … -
Replied To a Post in How to make a SWT Composite selectable?
I don't think many people here use SWT; it's all Swing or JavaFX. If you don't get any answers soon you may have to look somewhere else. Sorry. -
Replied To a Post in How to get date stored in database and display it in jdatepicker
DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules … -
Replied To a Post in How to code a counter that give marks to a player in a cetrain game?
`marks++;` If you want any more details you need to ask a sensible question with a sensible amount of information in it. -
Replied To a Post in Difference between bufferedReader and inputStream
That's where the source of your data is already in memory as an array of bytes. If your data is in a byte array use that class. If not, don't … -
Replied To a Post in Difference between bufferedReader and inputStream
InputStream reads bytes one at a time - no character set processing and no buffering. It's the parent class for stream input, but rarely used becuase one of its subclasses … -
Replied To a Post in Redirecting System.in stream
738 posts and you still don't post the complete text of the exception message and stack trace? Come on now... -
Replied To a Post in How to give input to a Thread from GUI
Like I said: No command line input -> get rid of that whole thread. You don't need it any more. In your action listeners just send the data to the … -
Replied To a Post in How to give input to a Thread from GUI
Looks like you're trying to adapt a command-line interface, which doesn't fit so well with Swing. In your action listeners for the GUI you can simply send the appropriate commands … -
Replied To a Post in Multiplying 2 numbers without using the * operator
On that site not only did he post that horrible code, but he either ignored or failed to understand the requirement - which included "no loops". Hopeless. -
Replied To a Post in Need help with ArrayList and methods.
Please never just say "get an error". Always post the complete text of all your error messgaes, along with the actual lines of code they refer to. Anyway, in tis … -
Replied To a Post in Need help with ArrayList and methods.
Collections.sort will do the trick - you need to define a Comparator that compares the bank balances - but that's overkill for just getting the largest. Hint: Remember the code … -
Replied To a Post in Need help with ArrayList and methods.
Just for the record: `bank.Customer@c390508` is the default toString() output (class name and hash) that every class inherits from Object. In your own classes you should override toString() to return … -
Replied To a Post in select value from jlist(populated from database)in jtable cell
DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules … -
Replied To a Post in Have I applied this 3-layer design pattern properly?
IMHO yes. Second layer holds the data model, and has all the methods relating to that - it's not dependent on the GUI (ie the GUI depends on the model, … -
Replied To a Post in Multiplying 2 numbers without using the * operator
Do you really think anyone will be interested in trying to decode such a horrible pile of opaque code? Meaningless variable names and no comments. It's also far longer and … -
Replied To a Post in Have I applied this 3-layer design pattern properly?
IMHO that's the standard OK implementation for a simple application. One would expect to see the middle layer consisting of (at least) a Dictionary class that holds a collections of … -
Replied To a Post in Need help with ArrayLists
You chose not to tell us the exact complete error message, including the relevant line numbers, but I'll give you this one for free... Your indentation of line 13 shows … -
Replied To a Post in Inheriting data from multiple classes?
CreateCharacter is what we call a "Factory" - it makes TestPlayers. Just constructing a CreateCharacter isn't enough - what it needs is a method that creates a TestPlayer ***and returns … -
Replied To a Post in Why insert at the end or front of the list?
Not always - it depends on the implementation of the list. For example a linked list has the same overhead for inserting an element in any specified position (indeed, if … -
Replied To a Post in Inheriting data from multiple classes?
In terms of architecture, a common solution is to have a master Game class that holds references to all the instances of all the components that make up the current … -
Replied To a Post in trying to get this code the right way to work
divinity02 has started 38 threads in the Java forum over the last seven months and is still unwilling to ask sensible questions or post proper error messages. None of those … -
Replied To a Post in Why insert at the end or front of the list?
A list is a list - an ordered sequence of values. Use it for whatever you want. Two possible uses are to implement a stack or implement a queue, but … -
Replied To a Post in Why insert at the end or front of the list?
If you insert at the end of a list and take from the front, that's a queue. If you insert at the front of a list and take from the … -
Replied To a Post in difference between develop android apps using jdeveloper and eclipse
Isn't android used on mobile devices? Aren't jdeveloper and eclipse development environments? How could this question possibly NOT be relevant to mobile development? -
Replied To a Post in Substance Look and Feel in java
Java 5 is no longer supported, so it has critical security bugs that have not been fixed. Java 7 is also approaching end of life. The only way to get … -
Replied To a Post in Was this task even more difficult in the early days of C in 1970?
It's really only justified where you need the absolute maximum performance, or you need to get very close to the hardware (eg device drivers). For anything else there are far … -
Replied To a Post in Was this task even more difficult in the early days of C in 1970?
*Which leads me to the question: was it this difficult in the 1960's and 1970's for Computer Scientists to create programs? * Only if they were foolish enough to use … -
Replied To a Post in compile/run error in my program
It looks to me like the data you are entering at runtime isn't what the program expects. Your new exception looks like Scanner's version of the oriogional exception, so it's … -
Replied To a Post in Convert any video format to MP4
I don't think you can do that within Java, so you probably need to run an external command-line utility using `ProcessBuilder`. Handbrake has an excellent repution for converting stuff betoween … -
Replied To a Post in JavaFX ListView Slide to reveal Button
Maybe... use a panel with the cell contents and the button, then animate it to slide left or right to reveal or hide the button? -
Replied To a Post in can somebody tell me what is wrong here
"when you said it takes two parameters and never uses them, what do you mean" static int calGpa(int grdevalpt, int qpts){ you pass two values, for grdevalpt and qpts, into … -
Replied To a Post in can't figure out how to move JTabPane down
I have not found a layout I couldn't achieve with GridBagLayout, but it's never easy. You may need to play with the weights and insets, and try setting the minimum, … -
Replied To a Post in can somebody tell me what is wrong here
calGpa is a disaster area: It takes two parameters, but uses neither of them It has variable names in quotes in the if tests Itr calculates grDval, but never uses … -
Replied To a Post in need help a new java student
So far so good... Those pieces of pseudo-code do relate to parts of the specification, so it's a good start. Now look through the rest of the spec and see … -
Replied To a Post in need help a new java student
DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules … -
Marked Solved Status for javac Cannot find my Example.java file
javac Cannot find my Example.java file after saving it in c:\program..\java..\bin\!! i am using win 7 (64 bit). Following points are so confusing.. 1. **Even i cannot** see the file … -
Replied To a Post in javac Cannot find my Example.java file
The only thing (apart from comments) that can preceed a package statement is an annotaion on the package statement. So if there is a package statement later in the file, … -
Replied To a Post in game
i can't just return a-6 or d-5 because the size of the board can be changed Why not? That's perfectly straight forward -
Replied To a Post in javac Cannot find my Example.java file
Exactly waht command are you using? Does your source file start with a `package` statement? -
Replied To a Post in can't figure out how to move JTabPane down
You seem to add it with a grid y of 1, the same as bottom panel. Use a grid y of 2 to place it below -
Replied To a Post in program in c language
and your question is....?
The End.