Today I am sharing with you another important topic where I will give you an example by which you will get a clear idea about how to read or search any Bengali or Bangla font from a text pad (notepad) or file and then show it in JTextField. This code is important for those who are trying to prepare English to Bengali Dictionary. Download the reader.txt which I have used here to read Bengali (Bangla) words.
Author: allaboutbasic
Java Vector Numeric value and SQL Query: How to use Numeic or integer values of a vector in SQL and also how to execute them.
Sometimes we may need to use the value of a vector mainly the integer or numeric value in SQL to execute a query . Suppose you have a vector named studentAge which contains two numeric value for example: [10,12]. Now, if you want to use these two vectors in the SQL to for query execution then you have to write the query as given below.
String sql=”select student_name from student where student_age in (” + studentAge .toString().substring(1, studentAge.toString().lastIndexOf(“]”))+”) and student_class =”+student-class;
Just You have to use the following line
(” + studentAge.toString().substring(1, studentAge.toString().lastIndexOf(“]”))+”)
Java HashMap Key Value Pair: How to show the Key Value pair data of HashMap.
Sometimes in java while we do coding and use HashMap we may need to check or see the values reside in Key and their corresponding Data or Values at the same time. Here I am sharing you another simple but useful technique to see the key value pair data of HashMap at a time. Just copy the code below and run it on your computer.
Continue reading “Java HashMap Key Value Pair: How to show the Key Value pair data of HashMap.”
Java break string in into individual words: How to split a string according to space,comma, colon and more between them and then save it in an array of string.
Today I am sharing you another basic but important technique about string manipulation. While coding in java, sometimes we need to split or break a string into individual word according to space, commas, colon or any other character between them and then save that individual words into an array of string.
The coding is simple and you can test it according to your need. Just copy the code below and run it in your own machine. Please give comments if this solution is helpful for you.
Java String Manipulation: How to search or match any given word in a string and then replace that word
Here, I am sharing you another basic technique about java where I have searched a word in a String and then replace it by another word. In this technique I have avoided case differences (avoiding upper case or lower case letter difference). From this example you will be able to know about
- How to search any specific word in a string
- How to avoid case difference while searching a word in a string using java
- How to replace any specific word ignoring case difference.
Java JButton Click event and JTable: Click on the JButton and the JTable will show or appear
Here I am sharing you a simple but useful way about JButton and JTable. Sometimes in designing software, where we are using JButton and JTable, we may need to code or design in such a way that just user will click on the JButton (by using JButton ActionListener) and the JTable will show or appear with its value. Copy the code below and run on your computer.
Java JButton below the JTable: How to use and place JButton just under or beneath the JTable.
Here I am sharing with you another simple but important fact related to java JTable and JButton. If you are using JButton and JTable in your software, it may need to place your JButton just under or below the JTable. Here I have shown the way how to place JButton just beneath the JTable. Just copy the code below and run in your pc.
Here is the Code: JButton Just Below or beneath the JTable
Theme Pilcrow by Automattic CSS Edit: How to edit the CSS style sheet to fit the size of your custom header?
Yesterday while visiting the forum I found another WordPress blogger, who was using theme Pilcrow by Automattic, faced problem to edit the CSS to use Custom header in her blog. She tried a lot to implement and use her Custom header in the blog by using CSS but didn’t get success. While examining her CSS code I found she did a little mistake for which her favorite custom header was not appearing in her blog. Actually the header Width and Height was 800 x 300 px, I found that in her CSS she used Width:800 px but she did mistake in the height value which she used was Height :3px (wrong value, it should be 300px). So, if you have purchased CSS upgrade from WordPress and using Pilcrow theme and want to change the header of your theme, just use the following code: Continue reading “Theme Pilcrow by Automattic CSS Edit: How to edit the CSS style sheet to fit the size of your custom header?”
JTable Cell Validation: How to make Cells of first Column will take Char (string)input other Cells of second column will take int (integer ) input.
In my last post I shared about how to assign two different JTextField in two different JTable Column cells. Today I am sharing with you another important part of JTable cell validation where I have tried to show you about how to make first column of JTable cells take only Char or string input and also at the same time how to make the cells second column take int (integer ) input from the users. To implement this validation process I have assigned two different JTextField in two different JTable Cell Column. Just Copy the following code and Run it in your pc.
JTable Cell Edit for validation: How to assign two Different JTextField in two different JTable Column Cells.
This post is also related to JTable cell validation, suppose our JTable has 3 columns. First column will take String or character type input and the second column or Column 2 will take integer type input from users. So, if we want to implement this scenario in our software we can solve it by assigning or using two different JTextField for the cells of Column 1 and Column 2 in JTable. In our example we used textBox1 (JTextField) in Column 1, which will validate string or char type input from users and for Column 2 I have assigned textBox (JTextField) to validate int type input from the users. The given solution is just a basic you can implement it as your own way. Just Copy the following code and run it.
