Huge Problem with programming :)
Dear All and Hi ,
I am brand new to java having just downloaded the SUN IDE, both the NetBeans IDE and NetBeans BlueJ IDE. Ive added NewJDialog.java*, or JDialog which seems to have a name property of 'dialog1' anyway I cannot seem to get it to show or instantiate ? or whatever.
No other problems with classes or anything so far :)
Any help please !
[378 byte] By [
rigidiga] at [2007-10-3 3:31:30]

> Dear All and Hi ,
> I am brand new to java having just downloaded the SUN
> IDE, both the NetBeans IDE and NetBeans BlueJ IDE.
IMO oyu made a terrible mistake. IDEs are not for newbies, I'd say. Stick with a good text editor.
> Ive added NewJDialog.java*,
No idea what that is.
> or JDialog which seems to
> have a name property of 'dialog1'
A what?
> anyway I cannot
> seem to get it to show or instantiate ? or whatever.
Newbies should stay away from GUI designers, too. This isn't VB. You're expected to know what you're doing. To show a JDialog, you have to tell it to show up.
http://java.sun.com/docs/books/tutorial/uiswing/
Ok point taken :) but how about someone suggesting what I can do here ? Yes I came from VB :)Do I have to use an import in the the main class ?use a line like ' dialog1.showMessageDialog();
Oh, sorry I missed the link you provided for me. Thx. [RESOLVED].
> Do I have to use an import in the the main class ?
Yes, you do. Just for info: if you want to use a class from another package, you have to use the fully qualified name, like
java.util.StringBuffer sb = null;
An "import" just tells the compiler: "whenever I talk about StringBuffer, I mean java.util.StringBuffer". So it's technically nothing but syntactic sugar.
> use a line like ' dialog1.showMessageDialog();
Yes, that's what you have to do. Look at the API docs for the exact syntax.
I'm a little puzzled by your remark - you don't think that newbies should be using an IDE? On the contrary, I think that regular text editors should be used by someone who's quite familiar with java. In other words, you know that the code you write will compile correctly.
When using an IDE like eclipse, it'll immediately tell you whether the code you write compiles or not, so I would think this would be of immense help to someone who doesn't know java. Also, there are many things to assist in coding (automatic getters & setters, implementation of superclass methods, etc.).
Yes, maybe a decade (?) ago, people used text editors, both experienced & new programmers. But nowadays, if you've got access to an IDE, why not use it right from the start?
But I can see where you're coming from--an IDE like Eclipse (the only 1 I've used) is a bit overwhelming in terms of its features, so to utilize most of its features, you do need to know java a bit.
And just a random comment--shouldn't your screenname be something like 'jeNeSuisPasUnProgrammeur"?
> I'm a little puzzled by your remark - you don't think
> that newbies should be using an IDE?
I'm in that camp, too.
> On the contrary, I think that regular text editors should be used by
> someone who's quite familiar with java.
I disagree; IDEs greatly enhance productivity and make the management of large projects, source control, deployment, refactoring, etc., much easier.
> In other words, you know that the code you write will compile
> correctly.
Being able to interpret compiler errors is an essential part of learning how to troubleshoot one's own code, in my opinion.
> When using an IDE like eclipse, it'll
> immediately tell you whether the code you write
> compiles or not, so I would think this would be of
> immense help to someone who doesn't know java.
I think this quality makes the IDE tend to become a crutch, and hampers development of researching/familiarity with the API and troubleshooting one's own code.
> Also, there are many things to assist in coding (automatic
> getters & setters, implementation of superclass
> methods, etc.).
Those are precisely the sort of things that those learning the language should learn to do on their own first (not to mention the notorious classpath issues).
~
> I'm a little puzzled by your remark - you don't think
> that newbies should be using an IDE? On the contrary,
> I think that regular text editors should be used by
> someone who's quite familiar with java.
That's like teaching children to do math with a calculator. I second the need for complete understanding of what the code means. Any code generation tool needs to have someone who understands the code that it generates operating it. It makes no sense to have unqualified people operate an IDE when there are plenty of qualified people. Forgetting how to program and learning how to use an application that programs for you is a sure path to humanity's failure. Just like the child who only knows the calculator and not the math, a programmer who doesn't know the code is doomed to failure when the IDE fails him. And hopefully at 0300h with a gun to his head.
> And just a random comment--shouldn't your
> screenname be something like
> 'jeNeSuisPasUnProgrammeur"?
You obviously don't get the joke. Go read some Hofstadter(sp?)
Brian
[snip]> And just a random comment--shouldn't your> screenname be something like> 'jeNeSuisPasUnProgrammeur"?What's funny or clever about that?
tsitha at 2007-7-14 21:25:32 >

> > And just a random comment--shouldn't your screenname be something like> > 'jeNeSuisPasUnProgrammeur"?> > You obviously don't get the joke. Go read some Hofstadter(sp?)What does Hofstadter have to do with it? Magritte.
MLRona at 2007-7-14 21:25:32 >

> What does Hofstadter have to do with it? Magritte.He explores the Magritte painting in his book, Goedel, Escher, Bach. I had, however, forgotten the name of the artist :PBrian
The Treachery of Images
http://en.wikipedia.org/wiki/Ren%C3%A9_Magritte
http://en.wikipedia.org/wiki/The_Treachery_Of_Images
"Magritte painted below the pipe, This is not a pipe (Ceci n'est pas une pipe), which seems a contradiction, but is actually true: the painting is not a pipe; it is an image of a pipe."
back on the subject of newbies and IDE's, my first post starting the thread when i was just begging java about two months ago i recieved lotsof advice to stay away from IDE.
Well I am pretty happy that I stuck with netbeans as it has helped me understand what is going on hundreds of times.
What is the definition of a crutch ?
> > I'm a little puzzled by your remark - you don't
> think
> > that newbies should be using an IDE?
>
> I'm in that camp, too.
Ditto. The "newbies shouldn't use IDEs" camp. Not the "puzzled" camp. Well, okay, yes, I'm usually puzzled, too. But not about that.
> > On the contrary, I think that regular text
> editors should be used by
> > someone who's quite familiar with java.
>
> I disagree; IDEs greatly enhance productivity and
> make the management of large projects, source
> control, deployment, refactoring, etc., much easier.
Ditto.
The also often act as a crutch that "saves" you from having to learn vital concepts, or as a smokescreen that masks what's really going on, or as a wad of mud that makes it hard to tell where the language ends and the tool begins--for beginners, that is.
> > In other words, you know that the code you write
> will compile
> > correctly.
>
> Being able to interpret compiler errors is an
> essential part of learning how to troubleshoot one's
> own code, in my opinion.
Mine too.
>
> > When using an IDE like eclipse, it'll
> > immediately tell you whether the code you write
> > compiles or not, so I would think this would be of
> > immense help to someone who doesn't know java.
>
> I think this quality makes the IDE tend to become a
> crutch, and hampers development of
> researching/familiarity with the API and
> troubleshooting one's own code.
Yup.
> > Also, there are many things to assist in coding
> (automatic
> > getters & setters, implementation of superclass
> > methods, etc.).
>
> Those are precisely the sort of things that those
> learning the language should learn to do on their own
> first (not to mention the notorious classpath
> issues).
Yup.
jverda at 2007-7-14 21:25:32 >

Do you think you could privide a conctete example of the statement you made below ?
->The also often act as a crutch that "saves" you from having to learn vital concepts, or as a smokescreen that masks what's really going on, or as a wad of mud that makes it hard to tell where the language ends and the tool begins--for beginners, that is. <--
> Do you think you could privide a conctete example of
> the statement you made below ?
>
> ->The also often act as a crutch that "saves" you
> from having to learn vital concepts
They might take care of package and classpath issues automatically, without you ever really understanding those concepts.
>, or as a
> smokescreen that masks what's really going on,
Can't really think of a concrete example here that's very different from the above. Similar idea--the IDE can do some things automatically, and therefore you can create valid code without understanding how it works.
> or as
> a wad of mud that makes it hard to tell where the
> language ends and the tool begins
I've seen a lot of questions here where people say, "i'm having this problem in Java..." and it turns out to be a prblem with their IDE--nothing to do with Java per se. Sorry, I don't have a particular example handy.
jverda at 2007-7-21 10:11:57 >

> Do you think you could privide a conctete example of
> the statement you made below ?
>
> ->The also often act as a crutch that "saves" you
> from having to learn vital concepts, or as a
> smokescreen that masks what's really going on, or as
> a wad of mud that makes it hard to tell where the
> language ends and the tool begins--for beginners,
> that is. <--
I can. Everyone knows it's so much easier to draw a graphof a function on a graphing calculator (by just entering what the function is), but you don't want to use this graphing calculator right from the start of your calculus study, as the ability to manually draw and analyze a graph helps tremendously to understand the concept of functions.
I mean, how would one immediately know how a function f(x) = 1 / (x- 3) looks like when he has only been punching them into a calculator?