Andy Richard

Ranch Hand
+ Follow
since Oct 22, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andy Richard

Tony Docherty wrote:The first exception is thrown because the socket was unable to connect to anything. Presumably you don't have anything listening for a connection on port 4000 on the localhost.


What does that means?
How can i make something listen to that port ??
8 years ago
Well guys, i'm totally new to Java..
I made the following stuff.. it runs, but no action is performed when i try to send it.
The cod is,



The errors i got are..
run:

I don't understand any part of error here..What exactly are these errrors, and how to re-solve 'em ??
8 years ago
after going through a few articles, i understood that the number of sockets a port can have depends on the OS.. but, i still wonder what that number is??
For win , linux ??
well Chan,
i edited to the actual error i got.. i placed tat whole stuff in a 'javaApplication9' package.. and a JavaApplication Class.. so just to make it look good name wise, i made the name as check here.
You are right, its the same error i'm getting you talked about..
But, how should i resolve the compilation error i get??
8 years ago
@Chan
This is the error i got..
8 years ago
I just made my first I/O code stuff..just to implement what i read and understood.
But the following code produces error..


Can anyone help me with that??
8 years ago
And i still don't understand why is there a need for it.. ??? :\
8 years ago
It's given on page- 364 !!
The para just above the code.
8 years ago
okay, i got my doubt cleared.
But what's hassling me now is that, why you need to paint the frame (panel) again when focus changes?
there is no such need in case of non-graphics stuffs...like we never make our whole say, a hello world program , to execute again on focus change... so why is there a need in case of GUI-based stuffs ??
btw,
i read it in the book... Head First Java.
8 years ago
Also, what is meant by saying that..
"You can't get the object by itself" ???
8 years ago
I read this in a book..
"
The argument to the method paintComponent( ) (i.e; a Graphics object) is the actual drawing canvas that gets slapped onto the real display. You can't get this by yourself; it must be handled to you by the system. You can ask the sysytem to refresh the display ( repaint() ), which ultimately leads to paintComponent() being called.
"
So, i don't understand why is there a need to call the paintComponent( ) everytime? liike it's called when you minimize/maximize the frame.. etc.
this is not the case with widgets like buttons, checkboxes, textareas... many more.
then why is this the case with paintComponent( ) ??
8 years ago

Tony Docherty wrote:
It can if it is the same package. If you want methods/variables to be accessible to sub classes in external packages then mark them as protected.


you sure ??
:O
then what's the difference in protected specifier ??
8 years ago

Tony Docherty wrote:
Why not try it and see what happens.


it isn't accessible.. ?
:\
8 years ago