7,116 Posted Topics

Member Avatar for Michael_43

"If someone could help me with some code or psuedocode on where to start" https://docs.oracle.com/javase/tutorial/essential/io/walk.html

Member Avatar for JamesCherrill
0
362
Member Avatar for SpottyBlue

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.

Member Avatar for JamesCherrill
0
706
Member Avatar for rohtashrathore

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 …

Member Avatar for mKorbel
0
256
Member Avatar for sam_7

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.

Member Avatar for sam_7
0
394
Member Avatar for laguardian

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) …

Member Avatar for jwenting
0
205
Member Avatar for centenond

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 …

Member Avatar for JamesCherrill
0
113
Member Avatar for divinity02

" 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

Member Avatar for divinity02
0
227
Member Avatar for Start4me

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 …

Member Avatar for mKorbel
0
1K
Member Avatar for hefaz

Depends on the platform... C# if Windows only Swift if Apple only Java if Linux or multi-platform

Member Avatar for JamesCherrill
-1
223
Member Avatar for Saboor880

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 …

Member Avatar for JamesCherrill
0
163
Member Avatar for nitin1

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 …

Member Avatar for JamesCherrill
1
3K
Member Avatar for nitin1

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Mahnoor_1

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 …

Member Avatar for Mahnoor_1
0
838
Member Avatar for Saifuddin_1

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.

Member Avatar for Saifuddin_1
0
247
Member Avatar for G_S

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 …

Member Avatar for JamesCherrill
0
285
Member Avatar for Benjamin_13

`marks++;` If you want any more details you need to ask a sensible question with a sensible amount of information in it.

Member Avatar for JamesCherrill
-1
36
Member Avatar for nitin1

738 posts and you still don't post the complete text of the exception message and stack trace? Come on now...

Member Avatar for JamesCherrill
0
136
Member Avatar for jsefraijeen

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.

Member Avatar for JamesCherrill
0
9K
Member Avatar for laguardian

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 …

Member Avatar for JamesCherrill
0
182
Member Avatar for bhupen8

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.

Member Avatar for JamesCherrill
0
221
Member Avatar for laguardian

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` …

Member Avatar for JamesCherrill
0
135
Member Avatar for Curious Gorge

*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 …

Member Avatar for Frederick2
0
468
Member Avatar for thirumoorthym

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?

Member Avatar for jwenting
-1
268
Member Avatar for gangsta gama

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 …

Member Avatar for JamesCherrill
0
255
Member Avatar for printf

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.

Member Avatar for JamesCherrill
0
156
Member Avatar for Doogledude123

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?

Member Avatar for Doogledude123
0
705
Member Avatar for divinity02

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.

Member Avatar for divinity02
0
360
Member Avatar for sankubha

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 …

Member Avatar for Schol-R-LEA
0
351
Member Avatar for TekknoDraykko

+ "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?

Member Avatar for TekknoDraykko
0
365
Member Avatar for sarthak25

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

Member Avatar for jwenting
0
2K
Member Avatar for Miran_Leli

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 …

Member Avatar for JamesCherrill
0
645
Member Avatar for divinity02

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)

Member Avatar for JamesCherrill
0
254
Member Avatar for ali11

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

Member Avatar for JamesCherrill
0
196
Member Avatar for Hind_1

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.

Member Avatar for JamesCherrill
0
379
Member Avatar for arup_1

Exactly waht command are you using? Does your source file start with a `package` statement?

Member Avatar for stultuske
0
252
Member Avatar for no123
Re: 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

Member Avatar for no123
0
147
Member Avatar for altjen

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. …

Member Avatar for Mr.M
0
232
Member Avatar for Brandon_7
Member Avatar for Markland
0
2K
Member Avatar for anirodacilis

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(", ");

Member Avatar for JamesCherrill
0
370
Member Avatar for HuePig

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).

Member Avatar for HuePig
0
320
Member Avatar for centenond

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 …

Member Avatar for centenond
0
148
Member Avatar for n21115

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for mmmmmmmm

Create a Map<String, Integer> that contains all the values you have processed so far, and check that before calling your method.

Member Avatar for JamesCherrill
0
189
Member Avatar for ali11

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...

Member Avatar for JamesCherrill
0
2K
Member Avatar for shockwave_05

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 …

Member Avatar for wiggles29
0
5K
Member Avatar for Levellous

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

Member Avatar for Levellous
0
258
Member Avatar for ahtisham.baloch.3

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.

Member Avatar for JamesCherrill
-2
126
Member Avatar for divinity02

Hi divinity02 I think you have been around DaniWeb long enmough now to know IF YOU HAVE A RUNTIME ERROR, POST THE ERROR MESSAGE!!!

Member Avatar for JamesCherrill
0
222
Member Avatar for sam_7

The Oracle Java tutorials are always a good source of info http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html

Member Avatar for JamesCherrill
0
181
Member Avatar for nananini

What is a "flood" application? DO you have any definition of what's required?

Member Avatar for JamesCherrill
0
59

The End.