This is a good resource for JavaFX dialogs and alerts.
Last night I was reading the classic old book, The Pragmatic Programmer, and came across this definition of DRY, an acronym that stands for Don’t Repeat Yourself:
“Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.”
That’s well stated, especially after a recent experience in which I found some code where I created an “Add Widget” dialog in a different way than I created its related “Edit Widget” dialog. I created the main pane of the dialog the same way, but I managed the details of the two dialogs that contained that pane differently, and I realized what I had done when I decided to make the dialog resizable. When I discovered what I had done, I refactored the code so both the Add and Edit dialogs were created by a single method.
As a note to self, I just used this code to delete rows from a JavaFX
TableView in a Scala application:
If you ever need to create a
Dialog in LibGDX, I can confirm that this example code works:
This is a list of Android code examples I’m starting to allow me to create rapid prototypes of Android applications using Android Studio. This is a very early list, I hope to be adding many more Android code snippets over time.
I am working on a way to rapidly mock up Android applications using Android Studio, i.e., to rapidly prototype Android applications on the fly, and little snippets of code help to make this happen. For instance, this snippet of code shows how to show a popup dialog to prompt a user to enter information into a text field:
Simon Peyton Jones, writing about “Respect” in the Haskell community. For the rest of his post, see this mail.haskell.org link.
If you want to show a
WebView component in an Android
AlertDialog, the following method shows how to do it:
Here's the source code for a simple
JOptionPane showMessageDialog example, where I use a
JTextArea inside of a
JScrollPane to show a long text message in the showMessageDialog: