7,116 Posted Topics
Re: "If someone could help me with some code or psuedocode on where to start" https://docs.oracle.com/javase/tutorial/essential/io/walk.html | |
Re: Post the complete text of your error message, or a detailed deescription of your unexpected behaviour. Don't expect people to guess what "got error" means in this case. | |
Re: You are doing a potentially slow database connect + SQL operation inside your actionPerformed - ie on the Swing Event Dispatch Thread. That's going to stop all GUI activity while the SQL is happening and lead to an apparent lack of responsivness on the screen. You should a start a … | |
Re: You have TWO login dialogs - one created in main (line 24), the other created in showLoginDialog() (line 72). The line 24 one gets the action listener, but the line 72 one is the one that is displayed, and that has no action listener. | |
Re: A couple of suggestions: override `equals(Object 0)` for your User class to test if two Users are "the same" by comparing their name, regName etc. Then you can use List's `contains` method directly use the enhanced for loop when possible - its easier to read: for (User u : user) … | |
Re: If your speed is a constant then you can only make 0, 45, 90 degree movements. To get any other angles you will need to vary the speed. Eg: if deltaX = distance to be moved in the x direction deltaY = distance to be moved in the y direction … | |
Re: " i always to give age a value everytime the age is re-enter" No you don't. You give a new value to p1age, not to age | |
Re: 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 that there is one entry field and one value returned. For your two-value case you should create your own simple … | |
Re: Depends on the platform... C# if Windows only Swift if Apple only Java if Linux or multi-platform | |
Re: 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 errors. Now Java flags the old way as unsafe. The way to do it in modern Java is ArrayList<PersonInfo> persons … | |
Re: 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 is usually more appropriate (eg BufferedReader) BufferedReader reads characters and buffers its input. If your input is text, always use … | |
Re: 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 to the server - all you need is a reference to the socket output stream. If you're not doing command … | |
Re: 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 the get methods) Have a constructor that takes all the data values and creates a fully-populated object OR any combination … | |
Re: 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. | |
Re: 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 DictionaryEntries, with methods that add or remove entries or change the collection itself. In the entry class I would expect … | |
Re: `marks++;` If you want any more details you need to ask a sensible question with a sensible amount of information in it. | |
Re: 738 posts and you still don't post the complete text of the exception message and stack trace? Come on now... | |
Re: 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 more repetitive than the solutions already posted. Nice try, but no cigar. | |
Re: 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 something useful - eg in this case the customer's name. Anyway - the code still won't work - it wil … | |
Re: 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 Post what you have done so far and someone will help you from there. | |
Re: 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 what you intended, but it's not correct. Your for loop just contains the statement on line 12. ps: The `==true` … | |
Re: *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 C or C++ for application programming. Applications like yours would be straight forward in business-oriented languages like Cobol, PL/1, RPG … | |
Re: 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? | |
Re: 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 state of the game, eg a list of Players etc. The Game class instance is shared by passing it to … | |
Re: 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 front, that's a stack. | |
Re: 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? | |
Re: 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 threads has ever achieved "solved" status. Maybe we are all wasting our time here. | |
Re: 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 all the latest security fixes is to go to the current version, which is Java 8. Java 6 and 7 … | |
Re: + "VALUES(courseID, courseName, department, instructor, courseDescription)" That string just contains the literal variable *names* ("courseID" etc). Didn't you intend to concatenate the *values* of those variables into the statement? | |
Re: 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 video formats, and has a command line interface. see https://trac.handbrake.fr/wiki/CLIGuide | |
Re: 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 the same underlying problem - eg maybe you are pressing enter multiple times after entering n1. If you just enter … | |
Re: 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 it It returns a value that is never set in the method (I didn't get any further than that) | |
Re: 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 | |
Re: 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 Post what you have done so far and someone will help you from there. | |
Re: Exactly waht command are you using? Does your source file start with a `package` statement? | |
Re: 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 | |
Re: Your enthusiasm and commitment are truely superb. I'm sure that you have the right attitude to achieve great things. But in this case I agree that this total project is unrealistic, and could just demotivate you. Apple shipped the first versions of their voice command software in MacOS around 1996. … | |
Re: code III has invalid syntax = it uses the method names without their () | |
Re: If those fields are separated by a comma and a space, you can simply use String's `split` method to create an array of fields String[] fields = sensorReading.split(", "); | |
Re: Assuming the velocity doesn't change, the position after time t is just current position + velocity * t You don't need speed as well because velocity, by definition, includes speed (velocity is speed and direction). | |
Re: If you don't keep them all updated, how will you know what their correct state is when they come on-screen? If you don't keep their position updated, how will you know when they come on-screen?? Keep the state separate from the GUI, so updating the state is a quick as … | |
Re: Hi n21115 JavaFX is still very new as a mainstream technology, and it looks like not many people here have got any real in-depth experience with it yet. Even if you can't get the answers you need I hope you will continue to feed back what you are learning about … | |
Re: Create a Map<String, Integer> that contains all the values you have processed so far, and check that before calling your method. | |
Re: Since you are using a null layout manager you can setBounds to make things whatever size you want. What happens when you run your program on a Mac with a "retina" display is another question... | |
Re: In defense of that particular point... `side` is private. Where I come from it's considered good practice to use the public accessors for private variables, even in the same class. Consider what happens if someone later changes the internal representation or implementation of that information. As long as they update … | |
Re: It's worth a try BUT... == and != test for Objects being/not being exactly the same object (same address in memory). You want to know if two different InetAddress objects represent the same IP address, for which you have to use their `equals` method | |
Re: 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 Post what you have done so far and someone will help you from there. | |
Re: Hi divinity02 I think you have been around DaniWeb long enmough now to know IF YOU HAVE A RUNTIME ERROR, POST THE ERROR MESSAGE!!! | |
Re: The Oracle Java tutorials are always a good source of info http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html | |
Re: What is a "flood" application? DO you have any definition of what's required? |
The End.