Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34501 > unrolled thread
| Started by | Dave <dboland9@fastmail.fm> |
|---|---|
| First post | 2016-06-06 16:03 -0400 |
| Last post | 2016-06-07 23:29 +0200 |
| Articles | 20 on this page of 26 — 9 participants |
Back to article view | Back to comp.lang.java.programmer
Moving code in Netbeans Dave <dboland9@fastmail.fm> - 2016-06-06 16:03 -0400
Moving code in Netbeans Lew <lewbloch@gmail.com> - 2016-06-06 13:47 -0700
Re: Moving code in Netbeans Dave <dboland9@fastmail.fm> - 2016-06-06 18:24 -0400
Re: Moving code in Netbeans Lew <lewbloch@gmail.com> - 2016-06-06 16:52 -0700
Re: Moving code in Netbeans Dave <dboland9@fastmail.fm> - 2016-06-06 23:04 -0400
Re: Moving code in Netbeans Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-06 23:30 -0400
Re: Moving code in Netbeans Dave <dboland9@fastmail.fm> - 2016-06-07 00:16 -0400
Re: Moving code in Netbeans Andreas Leitgeb <avl@logic.at> - 2016-06-07 06:53 +0000
Re: Moving code in Netbeans Nigel Wade <nmw@ion.le.ac.uk> - 2016-06-07 09:26 +0100
Re: Moving code in Netbeans Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-07 07:44 -0400
Re: Moving code in Netbeans Dave <dboland9@fastmail.fm> - 2016-06-07 07:53 -0400
Re: Moving code in Netbeans Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-07 08:24 -0400
Re: Moving code in Netbeans Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-07 13:22 +0000
Re: Moving code in Netbeans Eric Douglas <e.d.programmer@gmail.com> - 2016-06-07 06:23 -0700
Re: Moving code in Netbeans Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-07 10:10 -0400
Re: Moving code in Netbeans Eric Douglas <e.d.programmer@gmail.com> - 2016-06-07 07:36 -0700
Re: Moving code in Netbeans Arne Vajhøj <arne@vajhoej.dk> - 2016-06-07 20:23 -0400
Re: Moving code in Netbeans Lew <lewbloch@gmail.com> - 2016-06-07 13:43 -0700
Re: Moving code in Netbeans Arne Vajhøj <arne@vajhoej.dk> - 2016-06-07 20:30 -0400
Re: Moving code in Netbeans Arne Vajhøj <arne@vajhoej.dk> - 2016-06-07 20:19 -0400
Re: Moving code in Netbeans Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-07 20:31 -0400
Re: Moving code in Netbeans Arne Vajhøj <arne@vajhoej.dk> - 2016-06-07 21:12 -0400
Re: Moving code in Netbeans Eric Douglas <e.d.programmer@gmail.com> - 2016-06-08 06:41 -0700
Re: Moving code in Netbeans Arne Vajhøj <arne@vajhoej.dk> - 2016-06-08 17:08 -0400
Re: Moving code in Netbeans Lew <lewbloch@gmail.com> - 2016-06-07 13:39 -0700
Re: Moving code in Netbeans Robin Koch <robin.koch@t-online.de> - 2016-06-07 23:29 +0200
Page 1 of 2 [1] 2 Next page →
| From | Dave <dboland9@fastmail.fm> |
|---|---|
| Date | 2016-06-06 16:03 -0400 |
| Subject | Moving code in Netbeans |
| Message-ID | <nj4kv0$1mjn$1@gioia.aioe.org> |
I'm using NB to do a GUI. I want to re-organize the code a little, but I'm not able to move or cut/paste. Odd! I have never seen an IDE that lacked this ability, or at least an obvious one. Anyone know how to do this (aside from opening in an editor, moving, and hoping NB is ok with the changes)? Dave,
[toc] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2016-06-06 13:47 -0700 |
| Message-ID | <94dc4bfa-818d-43fc-b651-e8f3d5c0a293@googlegroups.com> |
| In reply to | #34501 |
Sounds like you're trying to rearrange generated code, which NB locks. As a rule NB allows moving code blocks.
[toc] | [prev] | [next] | [standalone]
| From | Dave <dboland9@fastmail.fm> |
|---|---|
| Date | 2016-06-06 18:24 -0400 |
| Message-ID | <5755F82F.7090709@fastmail.fm> |
| In reply to | #34502 |
On 06/06/2016 04:47 PM, Lew wrote: > Sounds like you're trying to rearrange generated code, which NB locks. As a rule NB allows moving code blocks. > Yes. NB seems to want to put things in its order, but I have a different idea of how things need to be. I like to organize things Property, Method, Event, support functions. Within each group, I do them alphabetically to make finding them easier. Is there an easy way to do this? Thanks, Dave
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2016-06-06 16:52 -0700 |
| Message-ID | <d5080771-13d0-4bfb-b5d5-34639e05b201@googlegroups.com> |
| In reply to | #34504 |
On Monday, June 6, 2016 at 3:24:58 PM UTC-7, Dave wrote: > On 06/06/2016 04:47 PM, Lew wrote: > > Sounds like you're trying to rearrange generated code, which NB locks. As a rule NB allows moving code blocks. > > > Yes. NB seems to want to put things in its order, but I have a > different idea of how things need to be. I like to organize things > Property, Method, Event, support functions. Within each group, I do > them alphabetically to make finding them easier. Is there an easy way > to do this? So this is NOT about protected code blocks, but just the default order of things? That order is configurable, to a degree. Have you played with the options? You should. Past a certain point, if you are depending on the IDE to organize your code your way and leave you no work to do at all, you will be disappointed. No IDE can account for your every personal quirk. You're just going to have to get off your butt and rearrange things for yourself if it comes to that. Tough luck, kid.
[toc] | [prev] | [next] | [standalone]
| From | Dave <dboland9@fastmail.fm> |
|---|---|
| Date | 2016-06-06 23:04 -0400 |
| Message-ID | <nj5dj7$nlp$3@gioia.aioe.org> |
| In reply to | #34507 |
On 06/06/2016 07:52 PM, Lew wrote: > On Monday, June 6, 2016 at 3:24:58 PM UTC-7, Dave wrote: >> On 06/06/2016 04:47 PM, Lew wrote: >>> Sounds like you're trying to rearrange generated code, which NB locks. As a rule NB allows moving code blocks. >>> >> Yes. NB seems to want to put things in its order, but I have a >> different idea of how things need to be. I like to organize things >> Property, Method, Event, support functions. Within each group, I do >> them alphabetically to make finding them easier. Is there an easy way >> to do this? > > So this is NOT about protected code blocks, but just the default order of things? That order is configurable, to a degree. Have you played with the options? You should. > > Past a certain point, if you are depending on the IDE to organize your code your way and leave you no work to do at all, you will be disappointed. No IDE can account for your every personal quirk. You're just going to have to get off your butt and rearrange things for yourself if it comes to that. Tough luck, kid. > That is what I want to do - just don't know how. I don't give a crap how NB structures things. I just want to be able to re-structure them when I have finished a class. So how?? Dave,
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2016-06-06 23:30 -0400 |
| Message-ID | <nj5f4u$6mh$1@dont-email.me> |
| In reply to | #34512 |
On 6/6/2016 11:04 PM, Dave wrote:
> On 06/06/2016 07:52 PM, Lew wrote:
>> On Monday, June 6, 2016 at 3:24:58 PM UTC-7, Dave wrote:
>>> On 06/06/2016 04:47 PM, Lew wrote:
>>>> Sounds like you're trying to rearrange generated code, which NB
>>>> locks. As a rule NB allows moving code blocks.
>>>>
>>> Yes. NB seems to want to put things in its order, but I have a
>>> different idea of how things need to be. I like to organize things
>>> Property, Method, Event, support functions. Within each group, I do
>>> them alphabetically to make finding them easier. Is there an easy way
>>> to do this?
>>
>> So this is NOT about protected code blocks, but just the default order
>> of things?
>
> That order is configurable, to a degree. Have you played with the
> options? You should.
>>
>> Past a certain point, if you are depending on the IDE to organize your
>> code your way
>
> and leave you no work to do at all, you will be disappointed. No IDE can
> account for
>
> your every personal quirk. You're just going to have to get off your
> butt and
>
> rearrange things for yourself if it comes to that. Tough luck, kid.
>>
> That is what I want to do - just don't know how. I don't give a crap
> how NB structures things. I just want to be able to re-structure them
> when I have finished a class. So how??
It's still not clear (to me, anyhow) whether you're talking about
code generated by NB or code you wrote yourself. The latter -- well,
you're certainly free to move it around, rename things, delete things,
and basically bash on it to your heart's content. But the code created
from a sketch of a GUI? No, sorry: NetBeans "owns" that code, basically
because you asked NetBeans to write it for you -- and if you modify the
sketch, NetBeans needs to be able to find re-write the code. This last
would be difficult if in the meantime you'd made arbitrary modifications
to it, no?
If you don't like NetBeans "owning" the code, write it yourself
instead of auto-generating it. And if that's not what you're having
trouble with, please explain your situation more completely.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
[toc] | [prev] | [next] | [standalone]
| From | Dave <dboland9@fastmail.fm> |
|---|---|
| Date | 2016-06-07 00:16 -0400 |
| Message-ID | <nj5hq0$s34$1@gioia.aioe.org> |
| In reply to | #34514 |
On 06/06/2016 11:30 PM, Eric Sosman wrote: > On 6/6/2016 11:04 PM, Dave wrote: >> On 06/06/2016 07:52 PM, Lew wrote: >>> On Monday, June 6, 2016 at 3:24:58 PM UTC-7, Dave wrote: >>>> On 06/06/2016 04:47 PM, Lew wrote: >>>>> Sounds like you're trying to rearrange generated code, which NB >>>>> locks. As a rule NB allows moving code blocks. >>>>> >>>> Yes. NB seems to want to put things in its order, but I have a >>>> different idea of how things need to be. I like to organize things >>>> Property, Method, Event, support functions. Within each group, I do >>>> them alphabetically to make finding them easier. Is there an easy way >>>> to do this? >>> >>> So this is NOT about protected code blocks, but just the default order >>> of things? >> >> That order is configurable, to a degree. Have you played with the >> options? You should. >>> >>> Past a certain point, if you are depending on the IDE to organize your >>> code your way >> >> and leave you no work to do at all, you will be disappointed. No IDE can >> account for >> >> your every personal quirk. You're just going to have to get off your >> butt and >> >> rearrange things for yourself if it comes to that. Tough luck, kid. >>> >> That is what I want to do - just don't know how. I don't give a crap >> how NB structures things. I just want to be able to re-structure them >> when I have finished a class. So how?? > > It's still not clear (to me, anyhow) whether you're talking about > code generated by NB or code you wrote yourself. The latter -- well, > you're certainly free to move it around, rename things, delete things, > and basically bash on it to your heart's content. But the code created > from a sketch of a GUI? No, sorry: NetBeans "owns" that code, basically > because you asked NetBeans to write it for you -- and if you modify the > sketch, NetBeans needs to be able to find re-write the code. This last > would be difficult if in the meantime you'd made arbitrary modifications > to it, no? > > If you don't like NetBeans "owning" the code, write it yourself > instead of auto-generating it. And if that's not what you're having > trouble with, please explain your situation more completely. > Actually, I was very clear. I'm creating a GUI, which means that some of the code is auto-created and located where NB wants to place them. I would like to restructure the class so all properties are together, all events are together, etc. How? Dave,
[toc] | [prev] | [next] | [standalone]
| From | Andreas Leitgeb <avl@logic.at> |
|---|---|
| Date | 2016-06-07 06:53 +0000 |
| Message-ID | <slrnnlcrs4.456.avl@login.logic.tuwien.ac.at> |
| In reply to | #34515 |
Dave <dboland9@fastmail.fm> wrote: > Actually, I was very clear. I'm creating a GUI, which means that some > of the code is auto-created and located where NB wants to place them. I > would like to restructure the class so all properties are together, all > events are together, etc. How? Have you considered downloading netbean's source and just modify it to your desires? This is no dumb response like "write your own IDE", because it might not be all that hard to find the spot where the elements are arranged into the generated java source, and have it arranged differently. Another option is, to use netbeans to create some dialogs, but then use a different IDE like eclipse (that doesn't know about netbeans' forms) to rearrange the code and further maintain those dialogs if any layout changes come up.
[toc] | [prev] | [next] | [standalone]
| From | Nigel Wade <nmw@ion.le.ac.uk> |
|---|---|
| Date | 2016-06-07 09:26 +0100 |
| Message-ID | <drneplFord2U1@mid.individual.net> |
| In reply to | #34515 |
On 07/06/16 05:16, Dave wrote: > On 06/06/2016 11:30 PM, Eric Sosman wrote: >> On 6/6/2016 11:04 PM, Dave wrote: >>> On 06/06/2016 07:52 PM, Lew wrote: >>>> On Monday, June 6, 2016 at 3:24:58 PM UTC-7, Dave wrote: >>>>> On 06/06/2016 04:47 PM, Lew wrote: >>>>>> Sounds like you're trying to rearrange generated code, which NB >>>>>> locks. As a rule NB allows moving code blocks. >>>>>> >>>>> Yes. NB seems to want to put things in its order, but I have a >>>>> different idea of how things need to be. I like to organize things >>>>> Property, Method, Event, support functions. Within each group, I do >>>>> them alphabetically to make finding them easier. Is there an easy way >>>>> to do this? >>>> >>>> So this is NOT about protected code blocks, but just the default order >>>> of things? >>> >>> That order is configurable, to a degree. Have you played with the >>> options? You should. >>>> >>>> Past a certain point, if you are depending on the IDE to organize your >>>> code your way >>> >>> and leave you no work to do at all, you will be disappointed. No IDE can >>> account for >>> >>> your every personal quirk. You're just going to have to get off your >>> butt and >>> >>> rearrange things for yourself if it comes to that. Tough luck, kid. >>>> >>> That is what I want to do - just don't know how. I don't give a crap >>> how NB structures things. I just want to be able to re-structure them >>> when I have finished a class. So how?? >> >> It's still not clear (to me, anyhow) whether you're talking about >> code generated by NB or code you wrote yourself. The latter -- well, >> you're certainly free to move it around, rename things, delete things, >> and basically bash on it to your heart's content. But the code created >> from a sketch of a GUI? No, sorry: NetBeans "owns" that code, basically >> because you asked NetBeans to write it for you -- and if you modify the >> sketch, NetBeans needs to be able to find re-write the code. This last >> would be difficult if in the meantime you'd made arbitrary modifications >> to it, no? >> >> If you don't like NetBeans "owning" the code, write it yourself >> instead of auto-generating it. And if that's not what you're having >> trouble with, please explain your situation more completely. >> > Actually, I was very clear. I'm creating a GUI, which means that some of the code is auto-created and located where NB > wants to place them. I would like to restructure the class so all properties are together, all events are together, > etc. How? > Very simple. There are two methods. You either cut the method body and paste it into a new method. Or you delete the code "protection" comments from before and after the method. ( // <editor-fold defaultstate="collapsed" desc="Generated Code">) Either way will result in you no longer being able to use Matisse to change anything. Also, whilst you are at it you probably want to delete the .form file which Matisse uses to generate the GUI since this will no longer serve any useful function and will probably confuse NetBeans. I fail to see why you would want to do this. If you are generating the code, and maintaining the code there's some logic to ordering the code so you can more easily locate things. But, since you are not creating the code, nor maintaining the code, I don't see how it matters what order the code is actually written in. NetBeans even helps you in this respect by collapsing/folding the generated code so you don't get to see it. If you want to have complete control then forget about using Matisse and design the GUI by hand. That way you get to decide exactly how the code is ordered. Trying to merge the two concepts, using Matisse to generate the code then editing it yourself, will lead to much frustration and eventual insanity. Don't go there. Choose one path and stick to it.
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2016-06-07 07:44 -0400 |
| Message-ID | <nj6c31$r33$1@dont-email.me> |
| In reply to | #34515 |
On 6/7/2016 12:16 AM, Dave wrote:
> On 06/06/2016 11:30 PM, Eric Sosman wrote:
>> [...]
>> It's still not clear (to me, anyhow) whether you're talking about
>> code generated by NB or code you wrote yourself. [...]
>>
> Actually, I was very clear. I'm creating a GUI, which means that some
> of the code is auto-created and located where NB wants to place them. I
> would like to restructure the class so all properties are together, all
> events are together, etc. How?
It may surprise you to learn that "GUI code" is not synonymous with
"auto-generated code," and that the first does not imply the second.
As for getting NB to auto-generate code that meets your stylistic
preferences -- well, if there's a way to do so I'm not aware of it. But
it doesn't seem to me that anyone should care about the auto-generated
code's appearance; it seems akin to worrying about the appearance of the
JVM bytecode generated by the compiler. Although auto-generated code is
Java, it is not "source:" the source is the stuff the GUI design tool
takes in, and the auto-generated Java is "object code." Nobody is
expected to read it (except in extremis while chasing weird bugs), and
certainly nobody is expected to modify it.
So: Sorry, I don't know how to achieve what you want, nor even if
it can be achieved. On the other hand, your desire seems daft.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
[toc] | [prev] | [next] | [standalone]
| From | Dave <dboland9@fastmail.fm> |
|---|---|
| Date | 2016-06-07 07:53 -0400 |
| Message-ID | <nj6cjf$988$1@gioia.aioe.org> |
| In reply to | #34521 |
On 06/07/2016 07:44 AM, Eric Sosman wrote: > On 6/7/2016 12:16 AM, Dave wrote: >> On 06/06/2016 11:30 PM, Eric Sosman wrote: >>> [...] >>> It's still not clear (to me, anyhow) whether you're talking about >>> code generated by NB or code you wrote yourself. [...] >>> >> Actually, I was very clear. I'm creating a GUI, which means that some >> of the code is auto-created and located where NB wants to place them. I >> would like to restructure the class so all properties are together, all >> events are together, etc. How? > > It may surprise you to learn that "GUI code" is not synonymous with > "auto-generated code," and that the first does not imply the second. > > As for getting NB to auto-generate code that meets your stylistic > preferences -- well, if there's a way to do so I'm not aware of it. But > it doesn't seem to me that anyone should care about the auto-generated > code's appearance; it seems akin to worrying about the appearance of the > JVM bytecode generated by the compiler. Although auto-generated code is > Java, it is not "source:" the source is the stuff the GUI design tool > takes in, and the auto-generated Java is "object code." Nobody is > expected to read it (except in extremis while chasing weird bugs), and > certainly nobody is expected to modify it. > > So: Sorry, I don't know how to achieve what you want, nor even if > it can be achieved. On the other hand, your desire seems daft. > I have always wondered why Java programs seem to be not quite as good as programs written in other languages. I always thought it was Java. After reading the responses to my question, I see the real reason Java apps are second class.
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2016-06-07 08:24 -0400 |
| Message-ID | <nj6edf$3hs$1@dont-email.me> |
| In reply to | #34522 |
On 6/7/2016 7:53 AM, Dave wrote:
> On 06/07/2016 07:44 AM, Eric Sosman wrote:
>> [...]
>> So: Sorry, I don't know how to achieve what you want, nor even if
>> it can be achieved. On the other hand, your desire seems daft.
>
> I have always wondered why Java programs seem to be not quite as good as
> programs written in other languages. I always thought it was Java.
> After reading the responses to my question, I see the real reason Java
> apps are second class.
Best, then, that you abandon Java. Since we idiots are just like
the idiots who write NetBeans and Eclipse and WebSphere and so on, if
you stick with Java you'll be condemned to using fools' tools.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Date | 2016-06-07 13:22 +0000 |
| Message-ID | <nj6hqm$9hu$3@dont-email.me> |
| In reply to | #34522 |
On Tue, 07 Jun 2016 07:53:20 -0400, Dave wrote: > I have always wondered why Java programs seem to be not quite as good as > programs written in other languages. I always thought it was Java. > After reading the responses to my question, I see the real reason Java > apps are second class. > You can always go back to using a text editor, hand-crafting every line of code to perfection and refactoring by hand too, lest the refactoring automaton destroys that perfection. I just hope you put equal care into writing all your package/class/method level comments so that the resulting Javadocs output is equally well organised and easy for even a neophyte to read. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
[toc] | [prev] | [next] | [standalone]
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2016-06-07 06:23 -0700 |
| Message-ID | <f737aeff-0635-48aa-8572-1f96a8132a85@googlegroups.com> |
| In reply to | #34522 |
On Tuesday, June 7, 2016 at 7:53:34 AM UTC-4, Dave wrote: > I have always wondered why Java programs seem to be not quite as good as > programs written in other languages. I always thought it was Java. > After reading the responses to my question, I see the real reason Java > apps are second class. If you believe a programming language is second to some other language for your purpose, you should probably be using that language. Personally I enjoy Java because it's platform independent, does everything I've needed it to do, runs fast enough, and allows us to write well structured readable code. Besides all it's built in functionality, the open projects available for common tasks really make it a solid choice. I've never used NetBeans. I've heard they rewrote it. I tried it years ago and it loaded too slow, so I just use Eclipse. I made my own GUI API and we have our own custom IDE for screen design so that hasn't been an issue. I always put my methods in alphabetical order so they're easy to find. Javadocs are in alphabetical order but other APIs usually aren't.
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2016-06-07 10:10 -0400 |
| Message-ID | <nj6kk0$qru$1@dont-email.me> |
| In reply to | #34528 |
On 6/7/2016 9:23 AM, Eric Douglas wrote:
> On Tuesday, June 7, 2016 at 7:53:34 AM UTC-4, Dave wrote:
>> I have always wondered why Java programs seem to be not quite as good as
>> programs written in other languages. I always thought it was Java.
>> After reading the responses to my question, I see the real reason Java
>> apps are second class.
>
> If you believe a programming language is second to some other language for your purpose, you should probably be using that language.
>
> Personally I enjoy Java because it's platform independent, does everything I've needed it to do, runs fast enough, and allows us to write well structured readable code. Besides all it's built in functionality, the open projects available for common tasks really make it a solid choice.
>
> I've never used NetBeans. I've heard they rewrote it. I tried it years ago and it loaded too slow, so I just use Eclipse. I made my own GUI API and we have our own custom IDE for screen design so that hasn't been an issue. I always put my methods in alphabetical order so they're easy to find. Javadocs are in alphabetical order but other APIs usually aren't.
FWIW, I've been a NetBeans user for a longish time, since version 3.
(NetBeans didn't become usable until version 5, but at my then place of
employment using it was a patriotic duty ...) Nowadays (version 8.2) I
find it fairly pleasant, most of the time.
I've never had much use for the various GUI generators, though. It
takes me longer to navigate through umpty-leven scrolling menus than to
just type the damn' code myself.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
[toc] | [prev] | [next] | [standalone]
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2016-06-07 07:36 -0700 |
| Message-ID | <293b869d-53ae-422a-872f-75c7f71d9b72@googlegroups.com> |
| In reply to | #34534 |
On Tuesday, June 7, 2016 at 10:10:20 AM UTC-4, Eric Sosman wrote: > I've never had much use for the various GUI generators, though. It > takes me longer to navigate through umpty-leven scrolling menus than to > just type the damn' code myself. I actually wrote one test program where I found GroupLayout useful, which Oracle states is used in every GUI screen in NetBeans. https://docs.oracle.com/javase/tutorial/uiswing/layout/layoutlist.html Normally we just setLayout(null) and hard code the x,y,width,height of every control.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-06-07 20:23 -0400 |
| Message-ID | <nj7oh7$m6e$1@gioia.aioe.org> |
| In reply to | #34528 |
On 6/7/2016 9:23 AM, Eric Douglas wrote: > On Tuesday, June 7, 2016 at 7:53:34 AM UTC-4, Dave wrote: >> I have always wondered why Java programs seem to be not quite as good as >> programs written in other languages. I always thought it was Java. >> After reading the responses to my question, I see the real reason Java >> apps are second class. > > If you believe a programming language is second to some other language for > your purpose, you should probably be using that language. I think he was suggesting that it was not Java that is a bad language, but Java developers that are bad developers. :-) In other words he was trying to insult the people he asked for help. Everyone knows that is a smart thing to do. Or something. Arne
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2016-06-07 13:43 -0700 |
| Message-ID | <ba6d2582-b49f-4be4-8679-27872a66d66b@googlegroups.com> |
| In reply to | #34522 |
On Tuesday, June 7, 2016 at 4:53:34 AM UTC-7, Dave wrote: > On 06/07/2016 07:44 AM, Eric Sosman wrote: > > On 6/7/2016 12:16 AM, Dave wrote: > >> On 06/06/2016 11:30 PM, Eric Sosman wrote: > >>> [...] > >>> It's still not clear (to me, anyhow) whether you're talking about > >>> code generated by NB or code you wrote yourself. [...] > >>> > >> Actually, I was very clear. I'm creating a GUI, which means that some > >> of the code is auto-created and located where NB wants to place them. I > >> would like to restructure the class so all properties are together, all > >> events are together, etc. How? > > > > It may surprise you to learn that "GUI code" is not synonymous with > > "auto-generated code," and that the first does not imply the second. > > > > As for getting NB to auto-generate code that meets your stylistic > > preferences -- well, if there's a way to do so I'm not aware of it. But > > it doesn't seem to me that anyone should care about the auto-generated > > code's appearance; it seems akin to worrying about the appearance of the > > JVM bytecode generated by the compiler. Although auto-generated code is > > Java, it is not "source:" the source is the stuff the GUI design tool > > takes in, and the auto-generated Java is "object code." Nobody is > > expected to read it (except in extremis while chasing weird bugs), and > > certainly nobody is expected to modify it. > > > > So: Sorry, I don't know how to achieve what you want, nor even if > > it can be achieved. On the other hand, your desire seems daft. > > > > I have always wondered why Java programs seem to be not quite as good as > programs written in other languages. I always thought it was Java. > After reading the responses to my question, I see the real reason Java > apps are second class. Is that some sort of thinly-veiled insult at the people who attempted to help you? If so, do you really feel that obstreperousness is a productive tactic? First of all, "seem" means that *you* judge it thus. That is, the phenomenon is in your mind, not the Java code. There is no evidence that Java code is written worse than in other languages. My personal experience and my experienced judgment of code that I've seen is that it is by and large the other way around - mediocre code in Java is better than mediocre code in other languages. However, the determinant is the programmer, not the language. There is no evidence that "Java apps [sic] are second class". The proper response from you to those who helped you here would be, "Thank you!" -- Lew
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-06-07 20:30 -0400 |
| Message-ID | <nj7ouj$mn2$1@gioia.aioe.org> |
| In reply to | #34522 |
On 6/7/2016 7:53 AM, Dave wrote: > On 06/07/2016 07:44 AM, Eric Sosman wrote: >> On 6/7/2016 12:16 AM, Dave wrote: >>> On 06/06/2016 11:30 PM, Eric Sosman wrote: >>>> [...] >>>> It's still not clear (to me, anyhow) whether you're talking about >>>> code generated by NB or code you wrote yourself. [...] >>>> >>> Actually, I was very clear. I'm creating a GUI, which means that some >>> of the code is auto-created and located where NB wants to place them. I >>> would like to restructure the class so all properties are together, all >>> events are together, etc. How? >> >> It may surprise you to learn that "GUI code" is not synonymous with >> "auto-generated code," and that the first does not imply the second. >> >> As for getting NB to auto-generate code that meets your stylistic >> preferences -- well, if there's a way to do so I'm not aware of it. But >> it doesn't seem to me that anyone should care about the auto-generated >> code's appearance; it seems akin to worrying about the appearance of the >> JVM bytecode generated by the compiler. Although auto-generated code is >> Java, it is not "source:" the source is the stuff the GUI design tool >> takes in, and the auto-generated Java is "object code." Nobody is >> expected to read it (except in extremis while chasing weird bugs), and >> certainly nobody is expected to modify it. >> >> So: Sorry, I don't know how to achieve what you want, nor even if >> it can be achieved. On the other hand, your desire seems daft. >> > > I have always wondered why Java programs seem to be not quite as good as > programs written in other languages. I always thought it was Java. > After reading the responses to my question, I see the real reason Java > apps are second class. What you asked for is not possible in NB. It is possible in some other IDE's (including some Java IDE's). You were told why it is like that. You can drop the idea or pick another tool that is better at doing what you want. But there is no reason to be surprised over NB's behavior. It is documented. Don't blame us because you did not read the documentation for the tool you chose to use. Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-06-07 20:19 -0400 |
| Message-ID | <nj7oaa$lu6$1@gioia.aioe.org> |
| In reply to | #34521 |
On 6/7/2016 7:44 AM, Eric Sosman wrote: > On 6/7/2016 12:16 AM, Dave wrote: >> On 06/06/2016 11:30 PM, Eric Sosman wrote: >>> [...] >>> It's still not clear (to me, anyhow) whether you're talking about >>> code generated by NB or code you wrote yourself. [...] >>> >> Actually, I was very clear. I'm creating a GUI, which means that some >> of the code is auto-created and located where NB wants to place them. I >> would like to restructure the class so all properties are together, all >> events are together, etc. How? > > It may surprise you to learn that "GUI code" is not synonymous with > "auto-generated code," and that the first does not imply the second. Yes. > As for getting NB to auto-generate code that meets your stylistic > preferences -- well, if there's a way to do so I'm not aware of it. Me neither. I am Eclipse user. And never use auto generated code for GUI. I really don't like GUI's at all. > But > it doesn't seem to me that anyone should care about the auto-generated > code's appearance; it seems akin to worrying about the appearance of the > JVM bytecode generated by the compiler. Although auto-generated code is > Java, it is not "source:" the source is the stuff the GUI design tool > takes in, and the auto-generated Java is "object code." Nobody is > expected to read it (except in extremis while chasing weird bugs), and > certainly nobody is expected to modify it. Hm. I believe that some GUI's actual used the code as source for GUI builder. It is almost a requirement for a bi-directional GUI builder where one can eithe ruse tool or manual edit the code, where the latter does not break the GUI builder (assuming you play nice). But NB used to be uni-directional and if it still is, then that logic does not apply. Arne
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.java.programmer
csiph-web