How to assign value to text view directly in Android Kotlin

In Android Studio, when referencing layout (GUI) elements, the normal flow is to use code as below: var tv = findViewById(R.id.tv_name) tv = myString But, in Kotlin, Prior Android version 10, it was easy to assign values to layout elements without using find_view_by_id by simply using: tv_name.text = myString However, this has stopped working and … Continue reading How to assign value to text view directly in Android Kotlin

How to make a form refer to the parent frame using a JDialog

Below code segment shows how to use a JDialog to refer to a parent frame. MyApp.java public class MyApp { JDialog dialog; JFrame parentFrame; public static void main(String[] args) { MyApp app = new MyApp(); app.gui(); } public void gui() { //The parentFrame parentFrame = new JFrame(); parentFrame = setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //The dialog dialog = new … Continue reading How to make a form refer to the parent frame using a JDialog

Delete all rows from a Java JTable with a custom TableModel

I want to clear all rows in a custom TableModel. Unfortunately, a custom TableModel in Java does not allow use of most efficient of row clearing methods, which only applies to a DefaultTableModel like that shown below: myTableModel.getDataVector().removeAllElements(); myTableModel.fireTableDataChanged(); To do an all clear like the above, for a custom TableModel, you need to reset … Continue reading Delete all rows from a Java JTable with a custom TableModel

Alternative desktops to Gnome 3 – Mate, Cinnamon

Linux users who find Gnome 3 clunky, now have a choice in desktop environments. You can install Cinnamon or go with Mate, which is fork of the Gnome 2 project. Funny that the Gnome developers did not realize that over time, their interface would introduce inefficiencies or wean away their users to other alternatives. Personally, … Continue reading Alternative desktops to Gnome 3 – Mate, Cinnamon

Use Windows Builder from Google to create GUIs in Java quickly

If you use Eclipse to create Java programs, you would know that there are several plugins that enable Eclipse to do magic. However, the Google Windows Builder plugin available from the eclipse market place, almost proves it can make "coffee". Using Windows Builder, you can create GUI windows using Swing, SWT or XWT in minutes. … Continue reading Use Windows Builder from Google to create GUIs in Java quickly

Install XFCE or LXDE as alternate desktops

It takes some time to get used to a new desktop environment, like Gnome 3. To help you get time to use the Gnome 3 graphical user interface (GUI), you can install the XFCE or LXDE desktop environments as alternatives: To install XFCE: # yum groupinstall xfce <enter> To install LXDE: # yum groupinstall lxde … Continue reading Install XFCE or LXDE as alternate desktops