-
Replied To a Post in Java MVC and multiple objects
That's a fair point. I certainly agree that the model should never have knowledge of the view (other than via a general "listener" pattern) However I'm personally happy to have … -
Replied To a Post in Computing the the response time of addition of two integer using Java threa
Do you have a question? -
Replied To a Post in Java MVC and multiple objects
1. The View class should just be given a reference to the Model that it will display, then all it needs are public methods like displayDetail() or displaySummary(). It should … -
Replied To a Post in Hide source java codes classes (encrypte) desktop application
When you create your jar file it's optional whether you include the source code or not. The source code is not needed to run the app, so don't include it. -
Replied To a Post in drawing triangles with python's turtle graphic
Hi Viral This is a web site for people who work with computers and want to learn more. If you want to learn how to write turtle code then start … -
Replied To a Post in Assigning the Nan's to the previous non-zero value.
> What do you mean by NAN, NAn, nan etc.? In many languages its Not a Number - a standard value that floating point variables can have, indicating that they … -
Replied To a Post in JOptionPane ShowConfirm Dialogue
So something like this? do { // process one pass of user input } while (JOptionPane.showConfirmDialog( null, "Do another one?", "Continue", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION); -
Undeleted a Post in JOptionPane ShowConfirm Dialogue
What is supposed to happen when the user say "yes" - do some other stuff and return to that point, or exit from what you are doing then go on … -
Deleted a Post in JOptionPane ShowConfirm Dialogue
What is supposed to happen when the user say "yes" - do some other stuff and return to that point, or exit from what you are doing then go on … -
Replied To a Post in JOptionPane ShowConfirm Dialogue
What is supposed to happen when the user say "yes" - do some other stuff and return to that point, or exit from what you are doing then go on … -
Replied To a Post in hi all
Hi! Welcome to DaniWeb! -
Replied To a Post in Trump
The disturbing thing is that Trump, and most Americans, think they are the world's policeman with the right to intervene and kill people they don't approve of in a foreign … -
Replied To a Post in #include<iostream> or #include<iostream.h>
Hi Ebrahim Welcome to DaniWeb. your questions and contributions are very welcome here, but please be aware of the rules and best practices for this site, including: don't hijack someone … -
Replied To a Post in JRadioButton
... more precisely: its the same answer for any class in any package other than the current package. Except there is an implicit import for java.lang.* so you can refer … -
Replied To a Post in JRadioButton
It's the same answer for any class in the Java API. -
Replied To a Post in JRadioButton
`import` is optional. You can always code the fully-qualified name `javax.swing.JRadioButton` every time you need it, but that can be very tedious. So you have the option to `import javax.swing.JRadioButton` … -
Replied To a Post in Java Vending Machine program
Hi Amazing_2 This thread is 8 years old, and not related to your question, so the right people won't see it. Please start a new topic to ask your question … -
Replied To a Post in Can you help a little
Hi. Yes, we can help. I can see that English is not your first language, so please try to be as clear as possible and speak simply. We will need … -
Replied To a Post in Unexpected token else
> Sorry. My English is very bad. Please edit my comments, so I learn to speak correctly. Well, that English is perfect, no edits needed! In the post itself... just: … -
Replied To a Post in compress
Kishan: Is that supposed to be a solution to ahmedrizwan's problem? Did you test it? It's certainly hard to follow... eg changing an outer loop's control variable from an inner … -
Replied To a Post in Unexpected token else
Probably mis-matched brackets, but unless you format your code properly it's going to be hard to see. -
Replied To a Post in compress
Lines 22-32 are not needed if you fix the termination condition for the loop on line 12 The spec says you do not include the count if it is 1, … -
Replied To a Post in Calculating Telephone Charge
I read the conditions. Nowhere do they say that the rate changes during the call. They say the whole call is billed at a rate that depends only on when … -
Replied To a Post in Test Driven Development in GameDev: What are your experiences?
I agree, it's a variant of agile. I've used agile-type methodologies in projects since the mid 1990's, and I'm a huge fan. The truth of software development is that nobody … -
Replied To a Post in C++ Number of days passed in the year
There are more basic problems with this code. eg if (month ==1) { cout<<"Number of days Passed in the Year: "<<sum<<endl; day=31; sum=day-yy; } This displays `sum`, which has not … -
Replied To a Post in Android from submission to local database crashes on button click.
Is there a stack trace or other error message? If so please post it. -
Replied To a Post in How to change this program to fully OOP ?
I agree with the above, but re-use and future developments, while essential to good commercial practice, are not the only criteria for object definition. Cohesion and Coupling, for me, is … -
Replied To a Post in How to change this program to fully OOP ?
If you want to go fully OO then you will also need some kind of Game class that encapsulates the process of playing a game and reporting the results. `zombie` … -
Gave Reputation to cahendi in JPanel background picture?
for add image in JPanel, you must create java class extends JPanel and you can make over in method paintComponent. example : [http://www.community-java.com/2017/03/cara-menambahkan-background-image-pada-jpanel-di-java-swing.html] -
Replied To a Post in implement the menu item
You forgot > read the user's reply into an int variable. (use your Scanner) -
Replied To a Post in JPanel background picture?
Anyone still reading this after 7 years... Don't use the code referred to in the previous post - it reloads the image resource every time the panel is repainted. That's … -
Replied To a Post in Strassen Algorithm Multithreading using Callable (Thread Pool)
With 4x4 matrices I'm surprised you can even measure execution time meaningfully. I'm not surprised that the overheads of a thread pool would greatly exceed the time to do a … -
Replied To a Post in implement the menu item
It sounds to me like you are expected to produce a simple text menu on the console - not a GUI. So JOptionPane etc is not relevant here. Just print … -
Replied To a Post in Questions on Objects and Classes
With three options it's not clear. For two it's` if`, for 4+ it's `switch`. But in real life the number of choices always increases over time, so in my opinion … -
Replied To a Post in Which design pattern to use
This is a bit of an odd question. Normally patterns are used to solve specific design problems. But anyway. Most patterns are quite low level and you would use a … -
Replied To a Post in Questions on Objects and Classes
A decrease is just a negative increase. So a decrease of 5% is the same as `adjSalary(-0.05);` -
Replied To a Post in finding the even and odd number from the array
You still didn't separate the two sets of if tests - the else on line 21 is creating the problem. Look again at the if/else structure I showed you in … -
Replied To a Post in How Can I Stop/Block Unwanted Mail From a Particular Sender?
Depending on your email client you should be able to create a rule that automatically deletes all mail from the provider as soon as it arrives. -
Replied To a Post in Computing the brightness of a binary star.
> is it better to use while() or do{} while? That depends on what behaviour you want! `while` tests the condition *before* entering the loop. The loop is executed zero … -
Liked / Shared Computing the brightness of a binary star.
can anyone help me with this assignment, Please. __________________________________________________ The brightness of a binary star varies as follows. At time t = 0 days its magnitude is 2.5, and it … -
Replied To a Post in Hi to all
Welcome to DaniWeb! -
Replied To a Post in Optimizing Java Launch Times
There's not a lot you can do to speed up the loading, buut you can give the impression of a very fast startup by displaying a splash screen while your … -
Replied To a Post in Illegal use of else ?
The semi-colon on line 1 is not the correct sytax for an if/else, so when the compiler gets to line 4 it does not see it as a valid `else` -
Replied To a Post in ATM program
This thread is 8 years old and the original poster isn'there now. Please start a new thread for your project and people will help you. -
Replied To a Post in how to solve error class,interface and enum in android studio project?
How can we tell if we can't see the relevant code? Post the code and we will help. -
Replied To a Post in General question
Just for clarity: There are two types of polymorphism, and one thing that isn't called polymorphism, in this discussion Overloading: You have multiple methods with the same name but different … -
Replied To a Post in finding the even and odd number from the array
That's because you have the if test for even/odd tangled up with the if tests for largest/smallest. Right now you don't get to the even/odd code (lines 20-25) if the … -
Replied To a Post in finding the even and odd number from the array
OK, that's neat code. Did you have a question? -
Replied To a Post in Word Association Game
pie --> e -
Replied To a Post in log file archivaly utility
OK, not such a good idea then! Nevermind. JC
The End.