Java - Encasulate Fields Short Cut Ctr Alt Shift E

2019-06-11 Thread chege
Hi,

Someone please help me on how to make 'Ctr Alt Shift E' shortcut work
in netbeans 11 (ubuntu 16.04).

Thanks,
Chege.

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Re: Error: JavaFX runtime components are missing, and are required to run this application

2019-06-11 Thread Eef Custers
Hi Geertjan,

While reading your reply I think  it is better that we closed our
conversation. Your answers are not much of a help. And it certainly has
nothing to do with not being able to make choices!
I am exploring all the possibilities of Netbeans11.0 with java12/javafx12.
In my environment some ways work others don't. That's why I am also looking
into the modular way of working, and why not!
Never mind, I will not address you anymore and leave it up to the community.

Regards.



Op do 6 jun. 2019 om 14:16 schreef Geertjan Wielenga :

> The key problem is that you need to make a choice: are you using Ant or
> Maven? Are you creating a modular application or not?
>
> No one can help you if in each and every mail you send you're trying
> something completely different -- i.e., now you suddenly mention
> module-info.java, which means you're creating a modular application.
>
> What is it that you want to achieve? No one can help you, if you don't
> know.
>
> Gj
>
> On Thu, Jun 6, 2019 at 2:13 PM Eef Custers  wrote:
>
>> Hi Jose,
>>
>> Thanks for your respons.
>>
>> This commandline was generated by Netbeans in case one did not wanted to
>> use Ant. This generated line contains errors ( colons instead of
>> semecolons), which I ofcourse removed. The rest of the config is collected
>> from internal settings. Indeed the mods directory is also configured in
>> Netbeans. In another programs I used the module-info.java. That build went
>> OK, but alo the run failed. I am really amased that these new versions do
>> not match. I am now almost two weeks going over the internet and trying all
>> kinds of ways of working, but I did not find a solution. Maybe the advise
>> will be: stay at version 8 for Java/JavaFX and Netbeans?
>>
>> Regards,
>>
>> Eef
>>
>>
>>
>>
>> Op do 6 jun. 2019 om 13:50 schreef jose.per...@gluonhq.com <
>> jose.per...@gluonhq.com>:
>>
>>> Hi Eef,
>>>
>>> Your command line says otherwise, but it tells what it is ultimately
>>> running:
>>>
>>> c:\java_lib\jdk-12.0.1/bin/java \
>>> -p C:\java_lib\javafx-jmods-12.0.1;
>>>C:\java_lib\javafx-jmods-12.0.1;
>>>
>>>  
>>> C:\java_lib\javafx-sdk-12.0.1\lib\javafx-swt.jar;C:\java_lib\javafx-sdk-12.0.1\lib\javafx.base.jar;
>>> *C:\java_lib\javafx-sdk-12.0.1\lib\javafx.controls.jar;
>>> *C:\java_lib\javafx-sdk-12.0.1\lib\javafx.fxml.jar;... \
>>>  -cp C:\java_lib\javafx-sdk-12.0.1\lib\javafx-swt.jar;
>>> C:\java_lib\javafx-sdk-12.0.1\lib\javafx.base.jar;
>>>  *C:\java_lib\javafx-sdk-12.0.1\lib\javafx.controls.jar;...
>>> ;D:\NbProjects\FxApp01_c\dist\FxApp01_c.jar \
>>>  fxapp01_c.FxApp01_c
>>>
>>> In this command line there are a few issues:
>>> - No "--add-modules javafx.controls,javafx.fxml"
>>> - JavaFX jmods and SDK mixed in the same module-path
>>> - Weird path " *C:\...", this looks bad.
>>>
>>> Please follow the sample:
>>> https://github.com/openjfx/samples/tree/master/IDE/NetBeans/Non-Modular/Java
>>>
>>> And make sure you have the right libraries and Path.
>>>
>>> Jose
>>>
>>> On 2019/06/06 11:36:17, Eef Custers  wrote:
>>> > Hi Jose,
>>> >
>>> > I did not missed step 5, I had that configured. As you can read in my
>>> other
>>> > reply to Geertjan something is going wrong at the initialisation of the
>>> > boot layer. The VM parameters processing is complaining about the last
>>> > value in the list, no matter what the value is.
>>> >
>>> > Regards,
>>> > Eef
>>> >
>>> > Op do 6 jun. 2019 om 10:34 schreef jose.per...@gluonhq.com <
>>> > jose.per...@gluonhq.com>:
>>> >
>>> > > Hi, you can still use Ant, of course, but as Geertjan already
>>> pointed out,
>>> > > you are missing this:
>>> > >
>>> > > --add-modules javafx.fxml,javafx.controls
>>> > >
>>> > > (no need for javafx.base nor javafx.graphics, as these are transitive
>>> > > dependencies of javafx.controls).
>>> > >
>>> > > which is also shown in the pic
>>> > >
>>> https://openjfx.io/openjfx-docs/images/ide/netbeans/ide/netbeans07.png
>>> > > that is part of the mentioned tutorial (step 5 VM options).
>>> > >
>>> > > About your module-path, there is an issue too: you shouldn't mix
>>> > > javafx-jmods with javafx-sdk paths. Mods are only required to do a
>>> custom
>>> > > image from a modular project, which doesn't seem to be your case now.
>>> > >
>>> > > Jose
>>> > >
>>> > > On 2019/06/06 05:08:23, Geertjan Wielenga 
>>> wrote:
>>> > > > Even without javafx.graphics there, it works.
>>> > > >
>>> > > > Gj
>>> > > >
>>> > > > On Thu, Jun 6, 2019 at 7:07 AM Geertjan Wielenga <
>>> geert...@apache.org>
>>> > > > wrote:
>>> > > >
>>> > > > > For me, it suddenly started working when I was following the
>>> > > instructions
>>> > > > > re --add-modules:
>>> > > > >
>>> > > > > --add-modules javafx.fxml,javafx.controls,javafx.graphics
>>> > > > >
>>> > > > > In the place indicated in the instructions, add the above.
>>> > > > >
>>> > > > > Gj
>>> > > > >
>>> > > > > On Thu, Jun 6, 2019 at 6:44 AM Geertjan Wielenga <
>>> geert...@apache.org>
>>> > > > > wrote:
>>> > > > >
>>> > > > >> 

Re: jTestField

2019-06-11 Thread Damian Carey
Swing & all GUI toolkit work takes a while to get your head around,
especially if you have only worked on the backend, and there is way too
much to put in a few emails.  One idea is that Swing (as any GUI toolkit)
is fundamentally single threaded.

The first thing that strikes me is "setFocus()". More typically you would
call a "request-Focus()" type method, and even that would be put in Swing's
Event Dispatch Thread (EDT) with an "invokeLater" call.

I've hacked around in Swing for 10+ years - but I'm far from an expert.

Perhaps stop trying to control the focus (try to leave that to Swing where
possible).

If you are playing / learning it might be good to follow an existing
start-to-finish tutorial.

Just some clues, so YMMV.
Cheers,

On Tue, 11 Jun 2019 at 09:09,  wrote:

> I hope you folks will bear with me. It’s been 12 years since I retired and
> used Java and I never coded the GUI. My job was the backend.
>
> I’ve designed the form using NetBeans and it does most of the work.
> But I’m having trouble with events and focus in jTextField.
>
> Entering data and depressing entry allows access to the contents the user
> has entered but doesn’t go to the next field. Depressing tab moves the
> focus to the next field but does not allow access to the data in the first
> field.
>
> I’ve tried to find a .setFocus and am rewarded with about 6 options none
> of which do what I want.
>
> I have searched docs and tutorials and obviously not found the right one.
>
> Any help will be appreciated.
>
> There are 10 types of people in the world,
> those that understand binary and those that don't.
>


Re: jTestField

2019-06-11 Thread Peter Hull
On Tue, Jun 11, 2019 at 12:09 AM  wrote:
> Entering data and depressing entry allows access to the contents the user has 
> entered but doesn’t go to the next field. Depressing tab moves the focus to 
> the next field but does not allow access to the data in the first field.
I'm not sure exactly what you're looking for, but:
If you press Return/Enter in a JTextField you'll get an ActionPerformed event
If you press Tab in a JTextField you'll get a FocusLost event (and
FocusGained in another component)
In either case you can get the contents of any text field at any time
by calling its getText() method.
So you can add handlers for the ActionPerformed and FocusLost events
to all the components you're interested in, and point these at a
common method which gets the data it needs from each component and
does whatever you want. In other words, ignore the stuff in the Event
parameter passed to the handler.
That's what I'd do, I bet others will have a more elegant way to do it.
Peter

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists