- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
8 Posted Topics
Are u sure ur java file is in src folder ??
[CODE] public class Stringtest { public Stringtest() { } static String s2; public static void main(String args[]) { String input="My name is billa"; String buffer=new String(); String generated=new String(); boolean flag; for(int i=0;i<input.length();i++) { flag=true; for(int j=0;j<buffer.length();j++) { if(input.charAt(i)==buffer.charAt(j)) { flag=false; } } if(flag) generated=generated+input.charAt(i); buffer=buffer+input.charAt(i); } System.out.println(generated); } }[/CODE]
Hi nidhish I have one suggestion, i think it is better to use TableModel for your Jtable when you need to change your table data dynamically. According to your code, you are reconstructing your table and adding into container again and again. It looks like giving more weightage for your …
Always Priority of Threads are 5(default). so which will execute first and second we cant guess it. Try to use setPriority() or Use Thread.sleep to make delay. So that you can see similar outputs for several execution.
//Here I have edited little in your code.. Instead of string i have used string array. [CODE]public String[] getAnswers() throws DAOException, SQLException{ //This still needs work String testName = "Test", formName = "Form"; String sql = "select item, itemkey from dbo.TestMaster " + "where TestName = ? and FormName = …
Check out this example. import javax.swing.*; import java.awt.event.*; public class demo_combo{ JComboBox combo; JTextField txtBox; public static void main(String[] args){ demo_combo ar = new demo_combo(); } public demo_combo(){ JFrame frame = new JFrame("Add-Remove Item of a Combo Box"); String items[] = {"Java", "JSP", "PHP", "C", "C++"}; combo = new JComboBox(items); …
Java - How to use system clipboard to copy and paste objects(JLabel or JButton) in a JFrame
Hi nidhish According to 9th line you have used result.next() without any if statement. If your table is empty while executing first time result.next() will throw an error. Got it?
The End.
murali_quest