-
Replied To a Post in import text file to JTable by using JFilechooser
Duplicate posting of the same question asked **and answered** on coderanch. Also apparently posted on dreamincode. -
Replied To a Post in How many Static Init can I have?
Just for curiosity... why ask for the number of static inits anyway? ps: I too am a bit of a bluesman, but I'm only 70. -
Unendorsed bluesman80
-
Endorsed bluesman80
-
Replied To a Post in How many Static Init can I have?
Can't think of any necessary reasons, but it may make the code clearer if different parts of the initialisation are split up? -
Replied To a Post in How many Static Init can I have?
As many as you want - there's no limit. -
Replied To a Post in Traffic simulator - graphics [Java]
2. The standard Swing API has all you need to track mouse press/relese, click, movements and drags. In the mouse listeners you simply get the mouse position and use that … -
Replied To a Post in Traffic simulator - graphics [Java]
1. Without all the code I can't reproduce that problem, but here's my best guess: You create the JPanel wih an initial size and location. You add that panel to … -
Replied To a Post in If a function does not have a return statement, is it valid?
Yes, Smalltalk is totally OO, all it has are objects and messages. Blocks of code are just objects. The language doesn't even have loops or if tests - the same … -
Replied To a Post in Traffic simulator - graphics [Java]
Good project! Yes, MVC is a good way to go, although it may be overkill for a simple app. The important thing to have a clean separation between model and … -
Replied To a Post in If a function does not have a return statement, is it valid?
My background is in Smalltalk, so I can't understand the design decision to return None/void from a method/function that has no specific return value. In Smalltalk a method with no … -
Replied To a Post in Why will Jcomponent Have add() And Remove() ways however part will Not?
JComponent is the base class for all Swing components except the top-level containers(JFrame, JDialog, JApplet). It does not define any `add` methods, but it does inherit a number of overloaded … -
Replied To a Post in Why will Jcomponent Have add() And Remove() ways however part will Not?
Hi Sorry, but that question cannot be understood in english. Can you try to explain it better please? -
Replied To a Post in The address of a char type variable (strange)
You can cast it so it's not a char pointer, eg `cout << (void*) &x` -
Replied To a Post in The address of a char type variable (strange)
> Isn't &var the address of any variable var, regardless its type? (or am I missing something?) Yes, but you are missing something, namely that the cout << operator for … -
Gave Reputation to Paul_65 in Crayon Box
Heya, so I think I found what's wrong and fixed it accordingly. So, in your Crayons class you have statements like color=color and length=length, but these statements are pretty reduntant. … -
Replied To a Post in Java - Random Number Generation
The `Random` class in the standard Java API has all you need. Just Google it. -
Replied To a Post in Thread in Javafx
Your approach to this is somewhat confusing - why not 4 timers each handling the color change for one button? Anyway, the NPE may be related to the button arrays … -
Replied To a Post in Java Static Method
Your question is too vague. What exactly do you need to know? How far have you got, and so where are you getting stuck? -
Replied To a Post in Default Filter DW
> JC: Your fix is to reverse a lifetime of insisting on moderation by the rules and expect mods to select posts for general viewing by giving them their first … -
Gave Reputation to happygeek in Default Filter DW
> But because I didn't want to filter by recommended, I never clicked it. Have to admit when I saw it said 'Filter: Recommended' I just assumed it meant that … -
Gave Reputation to Reverend Jim in Default Filter DW
>That's a real UI blunder - a button is an action control and should be labelled ... That could be clarified by changing the text from `Filter by` to `Filtered … -
Replied To a Post in Default Filter DW
I don't use the home page either - I just link direcctly to the programming forum. Yes, I did see that there was a control that said "filter by" followed … -
Replied To a Post in Default Filter DW
Thats just a straw man. I have never opposed filtering. Like all your moderators I have been tireless in deleting "blantant spam" so it has never been a problem for … -
Replied To a Post in Default Filter DW
> what we’re doing is pulling all content that has received at least one upvote Ahah! So people don't see content until people have seen it and upvoted it. > … -
Gave Reputation to alan.davies in Default Filter DW
>I find it perplexing and intriguing that the exact same people who have spent the recent year(s) complaining about how frustrating is that they have to sift through low quality … -
Replied To a Post in Java - Dice Game help
I share your confusion. The player doesn't actually play anything, just says OK and the computer rolls 4 dice and scores the result. My best guess is that some user … -
Replied To a Post in Default Filter DW
I've just understood what this topic is all about! I've been monitoring the Programming forum regularly, but there's nothing Java going on. Then this morning I randomly tried looking at … -
Replied To a Post in ImageIcon In jTable cell in netbeans
It all depends on whether you set the custom renderer for a column, a row, or an individual cell. The code above sets it for a column. ie all the … -
Replied To a Post in Colour choices in new UI
OK, ignore point 2 - I just found it. -
Created Colour choices in new UI
OK, so I'm gereatric and have fading eyesight, but light typeface in light grey on white? Serioudsly: constructive requests vfor the topics summary page: 1. Show the name of the … -
Gave Reputation to Jur_1 in please advice me about a good antivirus !!!!!
Avast - is trash! If you want to grab viruses - it's nice! Here most popular antiviruses https://bestantiviruspro.org/ -
Replied To a Post in How to continue a switch statement until the user decides to quit?
You have correctly been told twice by different people about moving the `dank` assignment to insode the loop, but you haven't moved it. -
Gave Reputation to rproffitt in Finder & Dock not working properly in Sierra
Sorry I passed this discussion up. Why I skipped it is the unsupported Sierra. I've found such installs to be troublesome so my advice is to restore to when it … -
Replied To a Post in Altering statistics of generated random numbers
What do you mean by "the statistical value"? If it's "average, std deviation etc" then you can't alter them except by altering the random numbers. Eg adding .7 to each … -
Replied To a Post in Trying to make a grading program loop to start from the beginning
Is this really answered? If not mark it "unsolved" and someone will help. -
Replied To a Post in How Should Voting Machines Work?
Obviously a mis-click for the adjacent self-driving topic. I tried to move it, but couldn't find that option. -
Replied To a Post in Java 11 now available for download
Yup. I thought everyone except corporate support sites were already on OpenJDK? Also new in 11... JavaFX is unbundled. Good luck trying to find easy instructions on how to re-integrate … -
Replied To a Post in Tory party conference app with ZERO login security hacked by pranksters
Does logging in to a system that requires no password count as "hacking"? -
Replied To a Post in Format HD and reinstall original Windows 7
> WHen you say the recovery image, do you mean the recovery partition or do I have to create a recovery image from the recovery partition? IF ( if ) … -
Replied To a Post in Java 11 now available for download
Yes. It's hard to get excited by this release. Its only significance is that it's a LTS release that finalises and fixes the (minor) goodies that were introduced in 9 … -
Replied To a Post in Format HD and reinstall original Windows 7
> those recovery systems fail far too often Well, maybe. But then it's just a re-boot and a few clicks to try the recovery partition and, if it works, job … -
Replied To a Post in Convert The numerical string to regular expression? How?
> I think it was a per(f)ectly valid to assume that ... meant "three digits dash three digits dash five digits Yes, sure. It's just that I've seen so many … -
Replied To a Post in Convert The numerical string to regular expression? How?
It's a really bad question. "123-422-17365" is just one string. A valid answer would be "123-422-17365" - thats a regex that matches the string. If you want to ask about … -
Replied To a Post in Format HD and reinstall original Windows 7
Why not simply use the recovery partition to restore the whole machine to its factory state? https://www.dell.com/support/article/fr/fr/frbsdt1/sln151763/how-to-restore-a-windows-7-factory-image-on-your-dell-pc?lang=en -
Replied To a Post in Convert The numerical string to regular expression? How?
A regular expression defines the rules by which a string can be analysed as conforming or not conforming to those rules. A numeric sample string does not define what the … -
Replied To a Post in why is it on hitting only the if statement when the wrong amount is entered
Obviously `moneyDeposit` needs to be declared and have a value set before you can use it in an if test. (I find it deeply depressing that I need to explain … -
Replied To a Post in why is it on hitting only the if statement when the wrong amount is entered
2: double moneyDeposit = 0; 3: 4: if(moneyDeposit > 2000) // will always be false!!! same problem lines 16-18 -
Replied To a Post in I keep getting this illegal start of expression and can't figure out why.
> @JC. I put this code into a C++ compiler.. Apart from the odd chars right at the end of line 16 this is 100% valid Java, -
Replied To a Post in I keep getting this illegal start of expression and can't figure out why.
Looks like Java > Why did you put the keyword Public there? Whats wrong with declaring a class `public`? > I keep getting this illegal start of expression and can't …
The End.