How to fix compile error in Android application where strings.xml contain invalid characters

I created an application with a string-array in the strings.xml file. Unfortunately, I left some apostrophe in one of the string values that was: D’Souza

Obviously, at compile time, the Android Studio 2.2 IDE threw an error about invalid characters not preceded by a \. I should have actually put the string as: D\’Souza

Now, . . . → Read More: How to fix compile error in Android application where strings.xml contain invalid characters

How to install and run Turbo C 2.01 for DOS in DOSBOX in linux

After sooo many years, discovered that students in India were asked to do projects in Turbo C 2.01 in DOS. Amazing, but true!

That being the case, you can download Turbo C 2.01 for MS DOS from http://edn.embarcadero.com/article/20841 for free. It is antique software and embarcadero acquired it way back. They offer it as a . . . → Read More: How to install and run Turbo C 2.01 for DOS in DOSBOX in linux

How to update or commit code changes from local github repository to repository on github

A user can make changes to code in their local folder (in this case, MumbaiStock) and then update or commit  that code into the github repository.

Below is the user information: github User ID is userid github User Name is “UserFirstName UserLastName” github User Email is “user@emailsystem.com”

To update github or commit code from the . . . → Read More: How to update or commit code changes from local github repository to repository on github

Error Unable to run mksdcard SDK tool in Android Studio in Linux

When installing the Android Studio in Ubuntu Linux, the error Unable to run mksdcard SDK tool appears. This can be fixed by opening a terminal window and entering the following command: $ sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6 <enter>

Speed up menu bar and sub options opening in Android Studio 1.4

As a user of Android Studio 1.4, I found that the menu bar and it’s sub-menus / sub options had a considerable delay before they showed up. I identified this to be with the icons and the animation effects on the menu and it’s appearance. To increase speed of the menu appearing, do the following: . . . → Read More: Speed up menu bar and sub options opening in Android Studio 1.4

GridLayout struggle when it has excess rows and how to overcome

In my Java code, I am using GridLayout (line shown in red) in code below:

frame = new JFrame(“Contacts Details”); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mainPanel = new JPanel(); buttonPanel = new JPanel(); mainPanel.setLayout(new GridLayout(9, 3)); buttonPanel.setLayout(new GridLayout(1, 3));

The result was this:

Name [                        ] (Text Box for name) City [                        ] (Text Box for City) Cell . . . → Read More: GridLayout struggle when it has excess rows and how to overcome

How to filter selection of files by extension in Java Swing’s JFileChooser

Display of files of a particular extension like .txt or .csv in JFileChooser can be done using the FileNameExtensionFilter in Java as follows:

fileChooser = new JFileChooser(); fileChooser.setSelectedFile(null); FileNameExtensionFilter fileFilter = new FileNameExtensionFilter(“CSV Files”, “csv”); fileChooser.setFileFilter(fileFilter); fileChooser.showOpenDialog(frame);

Window Builder Pro hangs in Eclipse Luna on Ubuntu 14.04 LTS

If you use Eclipse IDE for Java development, you will find that there is a great GUI builder from Google, and it worked very well on previous releases of Ubuntu.

Unfortunately, Eclipse just freezes when you use Windows Builder on 64 bit Ubuntu 14.04 LTS. Several posts on the Internet suggest installing Oracle Java 7 . . . → Read More: Window Builder Pro hangs in Eclipse Luna on Ubuntu 14.04 LTS

How to remove all rows from a Java JTable created using Custom TableModel

To remove all rows from a Java JTable created using Custom TableModel, try the following:

MyModel myTableModel = (MyModel) myTable.getModel(); for (int i = myTableModel.getRowCount()-1; i >= 0; i–) myTableModel.deleteRow(i);

Define the deleteRow(int row) method in the MyModel class.

Display a popup message in Java Swing

At times, we need to show quick messages in a small window on screen to users in Java. Here is a quick way to do this.

import javax.swing.JOptionPane JOptionPane.showMessageDialog(null, “This is my Message Dialog”);

September 2017
M T W T F S S
« Aug    
 123
45678910
11121314151617
18192021222324
252627282930