7,116 Posted Topics

Member Avatar for Ahmed91za
Member Avatar for Doogledude123
Member Avatar for Sherab_1

C and C++ are two languages. Java is another, completely different, language. You can't use a Java compiler for C or C++. JDK 1.5 is many years old, no longer supported, and has unfixed security errors. If you want to code in Java you should download the latest version of …

Member Avatar for Curius
0
135
Member Avatar for ilovearsenal

Maybe if you told us what the "warnings and problems" were then we could help. We're not mind readers.

Member Avatar for stultuske
0
144
Member Avatar for Sayam_1

http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/stereotype/Repository.html

Member Avatar for JamesCherrill
0
73
Member Avatar for Saboor880

Although it is theoretically possible to use Java and .net, in practice it's not feasible. Java comes with its own API that provides a superset of .net-like capsbilities, and is compatible across Windows Linux and Mac. Most Java developers use either NetBeans or Eclipse IDE - both free and downloadable …

Member Avatar for JamesCherrill
0
284
Member Avatar for Mr.UNOwen
Member Avatar for VigneshCIyer

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
101
Member Avatar for hermela_1

Your problem description is wrong. I ran your code with a print statement in the mouseClicked method as it WAS being called. It's the setBackground that's not working - presumably because you have a custom cell renderer that sets the background to fixed values. ps: I ran this on a …

Member Avatar for JamesCherrill
0
970
Member Avatar for Mahnoor_1

I think this is an old micro-optimisation thing that is irrelevant with modern compilers. The preincrement just adds 1 but the postincrement theoretically requires you to store the initial value before incrementing. Nowdays that would be optimised out anyway.

Member Avatar for Mahnoor_1
0
282
Member Avatar for Tala_22

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
44
Member Avatar for sirlink99

I agree. It's an installation problem. Possibly missing files, but more likely some old files that are sitting in the classpath somewhere and masking the Java 8 versions. I would formally uninstall all Java versions, then manually search & destroy all java-related directories, and delete the classpath variables, then download …

Member Avatar for JamesCherrill
0
1K
Member Avatar for sclansing68

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here. There are lots of people here who will freely give their time to help you become the best Java …

Member Avatar for JamesCherrill
0
273
Member Avatar for Melon Lord

Whenever the user changes either text box just update the total amount to $5 x (number in box 1) + $10 x (number in box 2)

Member Avatar for Melon Lord
0
221
Member Avatar for shailamureed

JavaFX (part of Java 8) has extensive media playing capabilities. Just Google it for tutorials etc.

Member Avatar for JamesCherrill
0
392
Member Avatar for nataraja833

Interesting question. A quick Google doesnt reveal any subclasses for Graphics2d - maybe they are private? You could do something that gives you a Graphics2d object (eg overide paintComponent) then test the runtime variable to see exactly what class it really is. With the actual class name it may be …

Member Avatar for nataraja833
0
1K
Member Avatar for divinity02

Hi - you didn't upset me, so don't worry. I can't see any code there that calculates a value for `gpay`, so its value remains at 0. Similarly for `netpay` and `payrate`

Member Avatar for rproffitt
0
160
Member Avatar for laguardian

`orders` is an arraylist of `Orders`, so (unless `Product` is a subclass of `Order`) you can't add a `Product` to it.

Member Avatar for JamesCherrill
0
497
Member Avatar for ddanbe

1. Is SphericalCoordinate *a kind of* PolarCoordinate? If not, it shouldn't be a subclass. EndOf. 2. Are there situations where you will use or accept a PolarCoordinate without worrying about whether it's cylindrical or spherical? If so, the common superclass will be useful 3. Is there a useful amount of …

Member Avatar for ddanbe
0
156
Member Avatar for danielley

You don't change what the dimensions are called, you just take a value for `side` and use it to set both dimensions to the same value.

Member Avatar for JamesCherrill
0
159
Member Avatar for Bobbiegirl

`first` is a variable, not a class, and it *is* defined, so that's not the problem. Read the error message: cannot find symbol ... method setMPG(double) it tries to call setMPG but there is no such method.

Member Avatar for JamesCherrill
0
913
Member Avatar for laguardian

Best not to reinvent the wheel. List already has a `contains` method `boolean contains(Object o)` Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that `(o==null ? e==null : o.equals(e))`. so for clarity …

Member Avatar for laguardian
0
377
Member Avatar for Sayam_1

There's no code there that displays anything. You have not written any code to display any output. So there is no output. You forgot to write print statements such as System.out.println("add: " + e.add(15,5));

Member Avatar for Sayam_1
0
96
Member Avatar for btissam

I'm not sure where you intend to use the Observer pattern. It's a common way to attach a GUI to a model, or to allow a "referee" to watch players that can move in real time, but for a strict turn based game the ref just needs to access the …

Member Avatar for btissam
0
256
Member Avatar for Christina_4

There are more than one ways to do this, but here's one: Start with an ArrayList containing the numbers of the columns with no queen. Initially it will contain the numbers 1..8. For each row, pick a column number from the ArrayList at random, place a queen at that row/col, …

Member Avatar for JamesCherrill
0
375
Member Avatar for nataraja833

What offset issues? You are unlikely to find anything faster than the standard API method, so the best approach is to work with it. Have you tried creating a transparent BufferedImage for the fill as I explained in your other post?

Member Avatar for nataraja833
0
488
Member Avatar for Ahmed_62
Member Avatar for JamesCherrill
0
231
Member Avatar for sasikrishnasamy

A Comparator is the right way to do it, so there seems to be something wrong with your implementation. If you post your code someone will help.

Member Avatar for 2teez
0
432
Member Avatar for Ahmed_62

AWT was Sun's first try at a Java GUI and it wasn't very good. So in 1998 (yes, seventeen years ago) they released Swing to replace AWT. Since then all the development has been in Swing, which has got better and better, faster and faster, while AWT remains stuck in …

Member Avatar for JamesCherrill
0
226
Member Avatar for Feras_1
Member Avatar for jorwill.harion
Member Avatar for JamesCherrill

I've opened this thread following rotten69's suggestion for "Java projects for beginners". To get things started I've posted a project in a format that makes sense to me; please feel free to follow that format, or to do it in some completely different style if that seems better. Let's see …

Member Avatar for Alok_5
20
3K
Member Avatar for dtpp

What do you mean "will not allow me"? Is there an error message? What does your jar spec look like?

Member Avatar for stultuske
0
229
Member Avatar for rajashree g.s.

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here. There are lots of people here who will freely give their time to help you become the best Java …

Member Avatar for JamesCherrill
0
391
Member Avatar for Sandeep_13

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 mKorbel
-1
626
Member Avatar for Szabi Zsoldos

Are you sure the .fxml file is in the correct directory structure inside your jar?

Member Avatar for Szabi Zsoldos
0
4K
Member Avatar for Rachna_2

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here. There are lots of people here who will freely give their time to help you become the best Java …

Member Avatar for JamesCherrill
0
176
Member Avatar for paul.deku.50_1
Member Avatar for Alan_7

There are lots of people here who will freely give their time to help you become the best programmer you can be. There's nobody here who is interested in helping you cheat or doing your homework for you. DaniWeb Member Rules (which you agreed to when you signed up) include: …

Member Avatar for David W
-2
656
Member Avatar for Utopia_1

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here. There are lots of people here who will freely give their time to help you become the best programmer …

Member Avatar for David W
-3
173
Member Avatar for aravindm

Debugging is not an answer. The behaviour of that code is undefined in the standards, so any compiler.now or in the future, can implement any order of evaulation it wants. Confirming that it works with one particular compiler is just setting yourself up for a disaster later. The code is …

Member Avatar for Moschops
0
202
Member Avatar for Xhesika

2 + 2x4 + 2x4x6 + 2x4x6x8 + (etc) see the pattern? Exactly what help do you need?

Member Avatar for JamesCherrill
0
154
Member Avatar for mama12

What exactly is the code supposed to do? What's the list `min` all about?

Member Avatar for JamesCherrill
0
138
Member Avatar for Saidivya

You can't do this by editing in place. You have to read the file one line at a time and write those lines to a new file. When you read a line starting with 6 write that line folloeed by the "79..." line.

Member Avatar for JamesCherrill
0
176
Member Avatar for aravindm

"without arrays/stacks/queues" makes this a lot more interesting - presumably that bans dictionaries as well? You could use a nested loop like (pseudocode) for i = 0 to string length for j = i+1 to string length if char j == char i, remove char j

Member Avatar for Mayukh_1
1
156
Member Avatar for Michael_43

I haven't time to read that all now, bu I did get as far as public static int lastValue = Integer.MIN_VALUE; ... if (root.data < lastValue) { // this can never happen!

0
163
Member Avatar for sam_7

There's nothing wrong with repeating things like Cancel buttons. They all have their own place/size in ther own forms. If they all do exactly the same thing then it would be OK for them to share a single actionListener.

Member Avatar for JamesCherrill
0
272
Member Avatar for Dhaval3731

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here. There are lots of people here who will freely give their time to help you become the best Java …

Member Avatar for JamesCherrill
-1
166
Member Avatar for SpottyBlue

You have methods called printXXX() that change the data values and print nothing. That's baffling. No surprise that the numbers change each time you try to print them. You repeat number of tickets in each subclass instead of implementing it once in the superclass. You have repeated identical blocks of …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Michael_43

That fragment of code makes no sense withoutall the other code that you didn't post here, so it's impossible to understand. You have shared variables, classes, and parameters that we know nothing about, and a method that seems to be all about its side effects. In particular line 9 looks …

Member Avatar for stultuske
0
203

The End.