AhFai Chan

Ranch Hand
+ Follow
since May 10, 2004
AhFai likes ...
Android Eclipse IDE Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by AhFai Chan

What I think of JavaFX

1 year ago
Thanks, these hints are like Aurum for me
1 year ago
Let the user continue working while waiting for a long running database operation to return the dataset
How do I display the "running circle" while that operation is executing?
I want the user to be able to tab to other JavaFX tabpanes and work on something else.
Thanks, I was actually looking for the default .css style sheet on launching the app.
for now, I'll just set the style using a hashmap and a loop.
1 year ago
Hi, Buttons have an onFocus(), but there doesn't seem to be an offFocus() method.
There are a lot of buttons in any given scene graph and when a Button has focus, the background color changes, but when I click on another button, I want the style to change back to what it was.
Like this, but the code is repetitive and it's not good coding style:

The only way I can think of doing it is putting all the buttons into an array of objects, typecast object to Button, and all of them change back to original style except the button that's on focus.
I was rather hoping there's a offFocus() method which changes the button back to original style.

Where can I find the default background color and thickness of the borders for Buttons?

1 year ago
Yes, I have m2e installed from the Eclipse Marketplace.

I will try your codes one more time, without using Maven and with simplest MVC structure.
1 year ago
I chose FX because, based on what I have read, it can be used on both desktop apps and Android, XML in Android is a bit long winded and tedious whereas Scene Builder gives me a visual almost instantly. But then again, Scene Builder is buggy.

Googling, I found a lot of articles suggesting Swing might be a better solution and there are very few developments in FX. Oracle abandoned it.

I will think about it over weekend.
1 year ago
FX seems great with simple applications and a shallow MVC architecture, but once the MVC directory level gets more complicated due to business rules, I can't get the controllers to communicate, always throwing an NPE exception if the directory levels are more than 3 deep.

Googling FX, many experienced developers suggested that it is not ideal compared with Silverlight, HTML5, Flash etc. Some suggested it is a failure. Is that why Oracle abandoned it?

Can I use Spring in the backend to get all the FX controllers to communicate? Would Spring be the solution?

If I were to abandon FX (I have spent 3 months coming to grip with its syntax and features), what is a good alternative to FX?
1 year ago
Same error message whichever way I do it:

Error: Could not find or load main class net.snortum.passdatademo.PassDataDemoLauncher

Maven is supposed to help out with versioning and dependency, but Maven is a bridge too far for me at the moment, I already have a large software ecosphere and hope to postpone Maven until I am ready.
I have downloaded Maven plugin for Eclipse, but that didn't help, same error message.

I am going to check out Springboot, some here suggested that and just  googled it. Seems it has features that JavaFX does not, at least not out of the box.
1 year ago
Just rebuilt my eclipse IDE with all the plugins.
I noticed you use Java 11.0.6 while I am still on Java 8. Based on the codes, there shouldn't be any problem running that.
My objective is to run your codes using your MVC directory structure and then increasing the depth of the structure.
Apologies, just managed to clone it in my rebuild-IDE, then imported it into Eclipse, but won't run, see .jpg
Throws this error:
Error: Could not find or load main class net.snortum.passdatademo.PassDataDemoLauncher

1 year ago

Paul Clapham wrote: leads me to believe that you think adding the listener to the thing actually causes the listener's changed() method to be called.

Back in 3GL days, I would have instantiated another variable String oldVal = txfCoyId.gettext() and compare the new value with the old value to see if it has changed, but it is not comething I can do inside the body of a method.
Are you suggesting I should use changed() without Listener?
1 year ago
Thanks. It works now, after removing Listener.
Yes, That's what I thought, that if I use a Listener, then the changed() method would be called.
1 year ago
Let me digest that first, I am still wobbly with javaFX.

Also, I had to de-install old and re-install the current Eclipse and lost my desktop GitHub, so no cloning.

But I did download, unzip and modified your codes. I couldn't get it working.

I am going to read up on factoryController, and if you can point me to more detailed example, much appreciated.

Finally, why do we need a callback.

In another question I posted here, I have and an if-then-else based on value of textfield.getText() without a Callback?

1 year ago

What if I require a PM to implement a project based on Basel III framework for compliance with global financial stability, with emphasis on capital market; capital adequacy ratio and liquidity. Prior exposure to repurchase agreements highly regarded. The will have to be comfortable interacting with senior management from bank, regulatory commission, with SEC and Treasury. Some interactions with EU counterparts required.

Would that result in an I.T. project? Oh yes, a few, they may even have project plans that report to a master project plan

Would you be comfortable sitting in a conference room meeting with these people, talking a language you probably don't understand? Would you be productive writing reams of project reports?  If not, then leave that to the PMs.

That said, what you want is a technical PM specializing in I.T. projects. That may be the career stream you are looking for, and I have seen quite a few of those. Yes, it helped that these PMs understand tech, perhaps was a techie. But you still have to deal with people, talk with them, communicate.
1 year ago