I don’t know if there’s a better way to do this, but I can confirm that this code works as a way to handle/capture keystroke combinations in JavaFX without having to use a menu/menubar:
A series of recent emails has me thinking about “life-changing events.” These are events where your life is clearly headed down one path, and then perhaps in an instant it’s no longer on that same path.
For me there is just one “major” event, which happened when I was a teenager. I’ll call this a Level 1 event. After that there are a series of other important events that are all at a similar level of importance (Level 2), but they are not as direction-altering as the Level 1 event(s).
It's been an interesting thought process. There are at least two moments that didn’t seem too important at the time, but when I look back at those events years later I can see how they changed my direction.
If you need to write an Android
onTouchEvent method inside a
View class, here’s some example source code (boilerplate/skeleton code) that shows how to implement this method, including how to use the
MotionEvent in the method, and how to get the x and y location of the touch event:
I was just reminded while reading The Beginner’s Guide to Android Game Development that the Java Component
repaint() method may called
paintComponent(), but it can also skip it as events coalesce.
The Bolder Boulder 10K run is Boulder, Colorado’s version of the Kentucky Derby.
Sencha ExtJS FAQ: How do I enable the use of the [Enter] key in the textfields of a form?
To let users hit the [Enter] key to submit a Sencha ExtJS form, I followed the example from the excellent book, Mastering ExtJS. First, I add this code to the
this.control block of my form controller:
This brief Sencha tutorial shows how to convert the text in a Sencha ExtJS textfield to uppercase on the textfield blur event. I use this technique on the
symbol field in a form where I let users enter stock symbols, such as “AAPL”, “GOOG”, etc.
symbol field in my StockForm.js view component is defined like this:
Mac iCal event reminders FAQ: How do I configure a Mac iCal reminder to remind me of birthdays, due dates for bills, and so on?
If you're new to the Mac world, and want to be able to set up reminders for various things like birthdays, pay bills, or attend events, the good news is that you can do this with the free software already installed on your Mac. The iCal Mac calendar application is just what you need.
Before I get too far away from all of the Java/Swing/Mac GUI code I've been working on lately, I thought I'd share this Mac Java ApplicationAdapter class implementation.
This class is an example implementation of Apple's ApplicationAdapter class, which itself is a stub implementation of their own ApplicationListener interface. If you want to write Java GUI code on Mac OS X, it's important to learn about the ApplicationAdapter class, so you can handle the About, Preferences, and Quit events properly.