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 … Continue reading How to install and run Turbo C 2.01 for DOS in DOSBOX in linux
Tag: programming
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 … Continue reading 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: … Continue reading 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 [ … Continue reading 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 … Continue reading 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");
Read data from a JTable created from AbstractTableModel
If you have a JTable in Java created with an AbstractTableModel, you can read the data from it, using following: int rowCount = testTable.getRowCount(); for (int i = 0; i < rowCount; i++) { String mColumn1 = (String) testTable.getModel().getValueAt(i, 0); String mColumn2 = (String) testTable.getModel().getValueAt(i, 1); } Alternatively, you could also try where the JTable … Continue reading Read data from a JTable created from AbstractTableModel