• Post Reply Bookmark Topic Watch Topic
  • New Topic

Code errors

 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi folks. Copying code from an instructor, character by character.
It runs without error on her Netbeans but gives me errors on lines 2,3, and 4.
Any suggestions how I can fix these errors?

Currently the red dots are saying:
; expected
variable float is already defined
variable num1 is already defined

TIA!
 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


What is that line of code intended to do?
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:

What is that line of code intended to do?


I don't know about that specific line, but the four lines of code add
two numbers in two fields. That's it. Very simple.
Add num1 + num2

I do have partial success with my code.
The frame loads, with its components showing.
If I enter numbers in the two number fields and then hit the Add button
I get a ton of red errors with no result...

but, when I hit the Clear button, the numbers are cleared from the fields.
And when I hit the Exit button, the app closes.
 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:
Paul Clapham wrote:

What is that line of code intended to do?


I don't know about that specific line...


But you got it from your instructor? Then you'd better go back and ask your instructor what you did wrong. Typing text which you don't understand and then asking people on the internet to help you fix it isn't a good strategy for learning Java, I'm sorry to say. It's just as bad to type working text which you don't understand, although it may seem better because it works. It really isn't better though.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
David Henstridge wrote:
Paul Clapham wrote:

What is that line of code intended to do?


I don't know about that specific line...


But you got it from your instructor? Then you'd better go back and ask your instructor what you did wrong. Typing text which you don't understand and then asking people on the internet to help you fix it isn't a good strategy for learning Java, I'm sorry to say. It's just as bad to type working text which you don't understand, although it may seem better because it works. It really isn't better though.


I got it from 'an instructor', not my instructor.
I don't have any instructor.

I will explain what I am up to.
I have no interest in becoming proficient in Java.
Much too late for that at my age.

Over the years I have dabbled with code in Excel VBA etc, nothing heavyweight.
I have a written a number of programs that actually worked!

Basically I am a hack and not apologetic about it. :)

I am interested in getting into sections of a full blown java program
and making a few changes.
Some people have already helped me make a few of these changes.

I just want to find out how to make code work with keystrokes rather than mouseclicks
The program is a 'touch friendly" app but 'keyboard unfriendly'.

I now know what a Frame, Panel, Button, main class, public, private class are.
The basics. That's enough for me. :)


 
Winston Gutkowski
Bartender
Posts: 10571
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:I have no interest in becoming proficient in Java.
Much too late for that at my age.

Maybe so, but in order to run a piece of Java, you do need to at least have an idea what it's doing.

For example: Look at line 4 in the code you posted (whose line numbers appear to be different from the ones in your messages).
What do you think that's trying to do?

Then have a look at the line before it and see if you can work out the difference between the two.

HIH

Winston
 
Campbell Ritchie
Marshal
Posts: 52508
118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And whenever the error hits you (you will hit yourself too) stop using floats. If you have to use floating‑point numbers use a double instead.
 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:I now know what a Frame, Panel, Button, main class, public, private class are.
The basics. That's enough for me. :)


Those aren't the basics, though. Frame, Panel, and Button are very specialized classes. One thing I would classify among "basics" of the Java language is the assignment statement. But apparently you don't recognize an assignment statement, because you miscopied several of them and then couldn't recognize the problem.

So yes, I agree, you could get by if you only knew the basics. To learn the basics I would recommend The Java™ Tutorials -- you'll find a section entitled "Trails Covering the Basics". You could probably get away with just the first half of the list of tutorial trails in that section.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
David Henstridge wrote:I now know what a Frame, Panel, Button, main class, public, private class are.
The basics. That's enough for me. :)


Those aren't the basics, though. Frame, Panel, and Button are very specialized classes. One thing I would classify among "basics" of the Java language is the assignment statement. But apparently you don't recognize an assignment statement, because you miscopied several of them and then couldn't recognize the problem.

So yes, I agree, you could get by if you only knew the basics. To learn the basics I would recommend The Java™ Tutorials -- you'll find a section entitled "Trails Covering the Basics". You could probably get away with just the first half of the list of tutorial trails in that section.


Thanks Paul I will check them out.

Here is the exact lesson I was trying to get working:

Netbeans Lesson

You can see all the Float.parseFloat stuff on that page that was giving me errors.
 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since we're talking about "basics", one of the basics you should learn is how to copy text from one place and paste it to another place. It beats the stuffing out of retyping things.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Since we're talking about "basics", one of the basics you should learn is how to copy text from one place and paste it to another place. It beats the stuffing out of retyping things.


I usually do that.
What text are you referring to specifically?
All code that I used I copied and pasted here.

Were you able to gain any insights as to why I may have received my error messages
despite using the same code from the course?
 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:What text are you referring to specifically?
All code that I used I copied and pasted here.


But you posted



whereas the lesson you linked to had this:



And when I copy and paste it I get this:



I suppose you just assumed your copy-and-paste had worked correctly (as any normal person would) but then when you started having problems you didn't go back and compare your code to the original.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
David Henstridge wrote:What text are you referring to specifically?
All code that I used I copied and pasted here.


But you posted



whereas the lesson you linked to had this:



And when I copy and paste it I get this:



I suppose you just assumed your copy-and-paste had worked correctly (as any normal person would) but then when you started having problems you didn't go back and compare your code to the original.



I'm glad you are trying to help me Paul.
You still are making assumptions though.

If you go back you will see that I said:

"I got it from 'an instructor', not my instructor. " (my code)
and later I said...
"Here is the exact lesson I was trying to get working:

Netbeans Lesson"

I DID NOT use the code that you find at that Netbeans site, letter for letter, character for character.

I was using a Youtube video where an instructor was basing HER LESSON on the Netbeans lesson.

She changed names/variables and I followed along with her names/variables.

I did not make any mistakes copying and pasting here.
WYSIWYG as far as what code I entered into Netbeans.

It still comes down to this. The code that I posted at the top worked for this instructor, as
she was entering it no Red errors popped up on the left side at any point.

As I was entering the code red errors kept popping up for me (using her code).

I made no mistakes entering the code. It was character for character exactly the same as hers.





 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I have to make assumptions, don't I? You don't tell us anything. And when you do, you tell us misleading things. That's just the nature of trying to explain things over the internet, or trying to explain things in general.

So I'll try not to. For example you said you copied text from a Youtube tutorial precisely, character for character. I'm not going to assume that you are correct in saying that. In fact it's quite likely that you aren't. What you posted wasn't valid Java code and your IDE correctly told you so. So if your Youtube instructor didn't have that problem, the conclusion to be drawn is that you typed different characters than the instructor, or you did something different while modifying the code.

At any rate when you modified the code, for some reason you removed the equals signs and changed perfectly normal assignment statements into code with errors.

 
Henry Wong
author
Sheriff
Posts: 22514
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:
I'm glad you are trying to help me Paul.
You still are making assumptions though.

...

It still comes down to this. The code that I posted at the top worked for this instructor, as
she was entering it no Red errors popped up on the left side at any point.

As I was entering the code red errors kept popping up for me (using her code).

I made no mistakes entering the code. It was character for character exactly the same as hers.



The code you posted doesn't compile. And you got a ranch full of developers here telling you so. It doesn't matter if you copied it correctly or not. It doesn't matter if you saw it run (on Youtube) correctly or not. The code you posted is simply not valid Java code.

Paul Clapham wrote:Well, I have to make assumptions, don't I? You don't tell us anything. And when you do, you tell us misleading things. That's just the nature of trying to explain things over the internet, or trying to explain things in general.


Additionally, I also don't think that it matters if the assumptions are correct or not. I don't think it matters if the descriptions are misleading or not. Etc. etc. etc.

The code that is posted (in the original post) is simply not valid Java code.

Henry
 
Zachary Griggs
Ranch Hand
Posts: 58
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is not valid code. Right now, you're naming "num1" and then creating a float with parseFloat, but the compiler has no idea what to do with this. I assume you wanted to store the created float in num1, but if so you'll need to tell the compiler that you want to do that, using the assignment operator (=).

But you should stay far away from GUIs until you have a good java foundation.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zachary Griggs wrote:
This is not valid code. Right now, you're naming "num1" and then creating a float with parseFloat, but the compiler has no idea what to do with this. I assume you wanted to store the created float in num1, but if so you'll need to tell the compiler that you want to do that, using the assignment operator (=).

But you should stay far away from GUIs until you have a good java foundation.


Thanks Henry and Zach.

Here is the full code. (not very long).
I tried this and another version (declaring the num1 and num2 at the end, for the second version).
Both gave me the same errors:




The

that you see at the top was added when I was trying to get rid of the red errors.
It didn't help.

This same code was used by the instructor and worked for her.
I can give you the video if you'd like.

 
Carey Brown
Bartender
Posts: 2231
27
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Notice the difference between
and

what do you want to happen with the returned value from parseFloat()?
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carey Brown wrote:Notice the difference between
and

what do you want to happen with the returned value from parseFloat()?



Thanks Carey.
I figured out the problem just before you posted.

Given that I'm a complete newb here I'm left scratching my head wondering why someone in the very first reply didn't say:

Just add an = sign between :

'num1' and 'Float'
'num2' and 'Float.parseFloat'
'result' and 'num1+num2'

and all the errors will go away!

It would have made life easier for all of us here.

 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Well, I have to make assumptions, don't I? You don't tell us anything. And when you do, you tell us misleading things. That's just the nature of trying to explain things over the internet, or trying to explain things in general.

So I'll try not to. For example you said you copied text from a Youtube tutorial precisely, character for character. I'm not going to assume that you are correct in saying that. In fact it's quite likely that you aren't. What you posted wasn't valid Java code and your IDE correctly told you so. So if your Youtube instructor didn't have that problem, the conclusion to be drawn is that you typed different characters than the instructor, or you did something different while modifying the code.

At any rate when you modified the code, for some reason you removed the equals signs and changed perfectly normal assignment statements into code with errors.




Paul take a look at this Youtube video. This is where it all started for me.

Unit 8 - Netbeans GUI tutorial

The code is this video is where I got everything I posted here above (before I knew anything about the Netbeans tutorial it was derived from).

If you note carefully you will see that this instructor DOES IN FACT leave out the EQUALS signs between:



just as I faithfully did.

And you will also note that the code runs for her at the end, despite the missing equal signs.
 
Campbell Ritchie
Marshal
Posts: 52508
118
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why should we look at that video? You have been told several times that isn't valid Java® code, so please believe us.
As I said earlier, don't use floats.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Why should we look at that video? You have been told several times that isn't valid Java® code, so please believe us.
As I said earlier, don't use floats.


Campbell I only asked Paul to look at the video. The reason I asked him specifically, was because of what he wrote here:


"For example you said you copied text from a Youtube tutorial precisely, character for character. I'm not going to assume that you are correct in saying that. In fact it's quite likely that you aren't. What you posted wasn't valid Java code and your IDE correctly told you so. So if your Youtube instructor didn't have that problem, the conclusion to be drawn is that you typed different characters than the instructor, or you did something different while modifying the code."

He concluded I typed different characters than what the instructor did. This video has smoking gun evidence that shows what characters the instructor typed.

 
Henry Wong
author
Sheriff
Posts: 22514
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:
He concluded I typed different characters than what the instructor did. This video has smoking gun evidence that shows what characters the instructor typed.


I agree with Campbell here. The code isn't valid, so the whole side thread was a waste of time. If you had acceptable that earlier, you could have moved on to the solution earlier.

This "smoking gun" evidence doesn't change that. At best, all it does is rationalize (or justify, not sure yet), you ignoring this fact, and hence, assign blame to someone. So, meh, arguably, this follow up side thread is also irrelevant.

Henry
 
Knute Snortum
Sheriff
Posts: 3253
82
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The smoking gun is, that in fact, the instructor typed in valid code.
WhatTheInstructorTyped.png
[Thumbnail for WhatTheInstructorTyped.png]
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:The smoking gun is, that in fact, the instructor typed in valid code.


Knute, I'm curious to know the minute mark of the video where you took that snapshot?
Here's a snapshot from the video, taken at the 5.55 min mark.

In this snapshot the instructor's code is not valid.
Java-5.55m.jpg
[Thumbnail for Java-5.55m.jpg]
Smoking gun snapshot
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
I agree with Campbell here. The code isn't valid, so the whole side thread was a waste of time. If you had acceptable that earlier, you could have moved on to the solution earlier.

This "smoking gun" evidence doesn't change that. At best, all it does is rationalize (or justify, not sure yet), you ignoring this fact, and hence, assign blame to someone. So, meh, arguably, this follow up side thread is also irrelevant.

Henry


Henry, I never said the code was valid nor was I trying to convince anyone of this.
Rather than telling me the code was not valid as several have done in this thread, it would have been far more productive and informative for me, had they said:

"Oh sure I can help you. You can fix the code by putting an equals sign between here, and here and here. Problem solved!"
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to clear up a few things here.

I defer to all respondents here, who I assume are experts, or at the very least extremely knowledgeable about Java.

I in contrast, am an absolute beginner with very little knowledge about the programming language.

If someone here tells me this or that approach is the preferred way to go I trust that they know best.

I started this post asking if someone knew why I was getting my errors messages.

I was particularly curious because they weren't error messages from code I had written.
Rather they were error messages I was getting from code that I had copied from someone else.
This other person running the same code (visually) was able to run theirs, I wasn't.

So I was perplexed about this.


If I was a regular at an English language forum (rather than a Java language forum)
and someone made a post along the lines of:

"Can someone please tell me what is wrong with this sentence?
'I woke up and brushed teeth this morning'. "

I would reply with something along the lines of:
Sure I can help you. You can fix the sentence by adding 'my' between 'brushed' and 'teeth'.

So this would be the correct way of writing your sentence:
'I woke up and brushed my teeth this morning'.

I would not reply along the lines of:

"What is the context of your sentence? What are you trying to say?"

or

"To learn the basics of the English language I would recommend
'Introduction to Academic Writing'.

or

"The sentence you wrote just doesn't make sense. It doesn't matter if you copied it correctly or not. The sentence is simply not a grammatically correct English sentence."
 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:Rather than telling me the code was not valid as several have done in this thread, it would have been far more productive and informative for me, had they said:

"Oh sure I can help you. You can fix the code by putting an equals sign between here, and here and here. Problem solved!"


Yeah, we could do that. But what's going to happen is, every time you get an error you will be here asking somebody else to fix it for you. And then after a year of this you will have your project completed and you will congratulate yourself, even though none of it was your work. If you're happy to do that, then carry on doing what you're doing now. For me, I would prefer for the result to be my work. Asking for advice, I don't have a problem doing that when starting out in a field where I don't know much, but I do prefer that I learn something and produce something out of that learning.

Anyway I've suggested in the past that the preferred way to go is for you to learn basic Java before you try working with the rather advanced code you have there. I reiterate that suggestion -- I believe I posted a link to a useful tutorial. It isn't a video tutorial, perhaps your learning style is more video-oriented than text-oriented but on the other hand it's a lot easier to copy code from a text-based tutorial.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
David Henstridge wrote:Rather than telling me the code was not valid as several have done in this thread, it would have been far more productive and informative for me, had they said:

"Oh sure I can help you. You can fix the code by putting an equals sign between here, and here and here. Problem solved!"


Yeah, we could do that. But what's going to happen is, every time you get an error you will be here asking somebody else to fix it for you. And then after a year of this you will have your project completed and you will congratulate yourself, even though none of it was your work. If you're happy to do that, then carry on doing what you're doing now. For me, I would prefer for the result to be my work. Asking for advice, I don't have a problem doing that when starting out in a field where I don't know much, but I do prefer that I learn something and produce something out of that learning.

Anyway I've suggested in the past that the preferred way to go is for you to learn basic Java before you try working with the rather advanced code you have there. I reiterate that suggestion -- I believe I posted a link to a useful tutorial. It isn't a video tutorial, perhaps your learning style is more video-oriented than text-oriented but on the other hand it's a lot easier to copy code from a text-based tutorial.


I understand what you are saying and concur with your thoughts overall.

My situation is probably quite a bit different from most who come here asking for help.
I would assume that most who come here are genuinely interested in learning Java programming.
I don't fall into that group. I certainly won't be a regular here.

As I mentioned up thread, I don't have any intentions of becoming even minimally proficient in Java coding.
I do not wish to write Java apps.

A Java application just happened to come my way. We will be using it shortly on a regular basis.
It does its job, but the interface leaves much to be desired.
I know it is possible to tinker with Java code and so I thought I would seek help in making some very minor adjustments.

Others in another forum where the app resides have helped me with some coding already.
Changing a multiplication value from '1.0' to '.5' etc.
Moving a panel button from the left side of screen to the right side of screen.
These are the types of things I am interested in.









 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:A Java application just happened to come my way. We will be using it shortly on a regular basis.
It does its job, but the interface leaves much to be desired.
I know it is possible to tinker with Java code and so I thought I would seek help in making some very minor adjustments.


Frankly, if that's the case I think it would be much more practical to just ask somebody else with Java experience to do that for you. That way the changes are going to get done in a finite time and the end product is going to be reliable.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:

Frankly, if that's the case I think it would be much more practical to just ask somebody else with Java experience to do that for you. That way the changes are going to get done in a finite time and the end product is going to be reliable.


I agree again.
If the changes were important/critical/many I would go that route.

But they are small and not very important really.
 
Henry Wong
author
Sheriff
Posts: 22514
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:
Knute, I'm curious to know the minute mark of the video where you took that snapshot?
Here's a snapshot from the video, taken at the 5.55 min mark.


Here's a snapshot from the video, also taken at the 5.55 min mark. And it looks fine to me.

Henry


PS... I still think that this side discussion is silly, but since the main discussion has been completed, why not? ...
Coderanch_Equals.jpg
[Thumbnail for Coderanch_Equals.jpg]
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
David Henstridge wrote:
Knute, I'm curious to know the minute mark of the video where you took that snapshot?
Here's a snapshot from the video, taken at the 5.55 min mark.


Here's a snapshot from the video, also taken at the 5.55 min mark. And it looks fine to me.

Henry


PS... I still think that this side discussion is silly, but since the main discussion has been completed, why not? ...


Thanks Henry.
Let's set aside all our other differences and just focus on this one anomaly that has me completely baffled.

I have been using computers for more than 30 years now and probably a lot of members here have as well.

I can't think of any explanation for the differences we are seeing in the video.
In the screenshot I posted you can see that there is not even the faintest hint of equals signs in the area we are focusing on.

Please tell me of some possible reasons why the video I watched (and downloaded) and the one you watched are different?
I am beginning to think there is some kind of conspiracy going on here.



 
Liutauras Vilda
Marshal
Posts: 3169
127
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:I can't think of any explanation for the differences we are seeing in the video.
In the screenshot I posted you can see that there is not even the faintest hint of equals signs in the area we are focusing on.

Please tell me of some possible reasons why the video I watched (and downloaded) and the one you watched are different?
I am beginning to think there is some kind of conspiracy going on here.

Shall I mark this topic as "resolved" for you?

We're trying to keep threads content beneficial for future readers without adding unecessary noise which are not related directly to the problem you were trying to solve.

Note: The video I see at 5:55, there is also missing "=" equal sign. So it is not only you. It might different video's running based on the world area.
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Liutauras Vilda wrote:
Shall I mark this topic as "resolved" for you?

We're trying to keep threads content beneficial for future readers without adding unecessary noise which are not related directly to the problem you were trying to solve.



Sure if you wish.
 
Liutauras Vilda
Marshal
Posts: 3169
127
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case you missed what I added to my previous post after I checked that video: "The video I see at 5:55, there is also missing "=" equal sign. So it is not only you... Thinking of the reason myself."
 
Dave Tolls
Ranch Hand
Posts: 2268
23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to go with video resolution.
Either different resolutions of the video itself, or in the display of it.
Depending on how the compression does its thing (at either end) it's possible to lose narrow vertical and/or horizontal lines.

Do you lot not see the '=' as they're being typed in in the 20 seconds or so prior to that screenshot?
 
Winston Gutkowski
Bartender
Posts: 10571
64
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:If the changes were important/critical/many I would go that route.
But they are small and not very important really.

OK, well for a self-described "newb" and someone "who is [not] interested in learning Java programming", you've picked yourself a hell of a project to "tinker with".

GUI code in general, and Java Swing code in particular, is NOT for the faint of heart: It's fiddly, verbose, complex, and easy to get wrong. I've been programming for nearly 40 years (14 with Java), and I absolutely loathe it - and if I possibly can I'll hand it off to someone who enjoys that sort of stuff (they do exist ).

Even for a newb who was interested in learning Java, this would be a tough assignment. For you, I fear it may be a bridge too far; and you certainly will have to learn quite a bit before you're competent to "tinker".

Winston
 
Henry Wong
author
Sheriff
Posts: 22514
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Henstridge wrote:
I can't think of any explanation for the differences we are seeing in the video.
In the screenshot I posted you can see that there is not even the faintest hint of equals signs in the area we are focusing on.

Please tell me of some possible reasons why the video I watched (and downloaded) and the one you watched are different?
I am beginning to think there is some kind of conspiracy going on here.


Well, you can try upgrading your browser, try a different browser, and / or try a different option (which I believe Youtube supports) on that browser. Additionally, you can try upgrading the plugins (such as getting the latest Flash). Or if you are using a media player, you can try a different codec driver (or upgrading the one you have). etc.

Dave Tolls wrote:I'm going to go with video resolution.
Either different resolutions of the video itself, or in the display of it.
Depending on how the compression does its thing (at either end) it's possible to lose narrow vertical and/or horizontal lines.


Agreed, it is definitely related to resolution... You can see it in the screenshots. Besides the equal signs being missing, the screenshot is incredibly pixelated.

Henry
 
Liutauras Vilda
Marshal
Posts: 3169
127
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:Agreed, it is definitely related to resolution... You can see it in the screenshots. Besides the equal signs being missing, the screenshot is incredibly pixelated.
Did someone say my new 4K resolution monitor is not good enough and shows incredibly pixelated pictures

I've tried all offered (by youtube) resolutions.
I was looking on MacBook machine. Was trying on integrated Retina screen (2560x1440) as well as on 4K external monitor (with native pixel-doubled 1920x1080) - same issues. Interesting..

After all I'm fully convinced about the argument's correctness why we ask on Ranch to provide the code in the text format rather than screenshots or videos.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!