32,199 Topics

Member Avatar for
Member Avatar for Hemanth.Satkuri

Hi, I have created a table with first column as checkbox. Using the below Code.. TableColumn tc = constructedTable.getColumnModel().getColumn(0); tc.setCellEditor(constructedTable.getDefaultEditor(Boolean.class)); tc.setCellRenderer(constructedTable.getDefaultRenderer(Boolean.class)); tc.setHeaderRenderer(new CheckBoxHeader(new MyItemListener())); I sometimes get stackoverflow exception. Is This beacause of the above code..?

Member Avatar for JamesCherrill
0
183
Member Avatar for bruizer

import javax.swing.*; import java.awt.*; import java.text.*; import java.awt.event.*; public class SchoolApplet8 extends JApplet implements ActionListener { double userAmount; double userInterest; double userTerm; int month = 0; double remainBalance = 0; double interestPayment = 0; double principalPaid = 0; JPanel row1; JLabel lblAmount; JTextField txtAmount; JLabel lblInterest; JTextField txtInterest; JLabel lblTerm; …

Member Avatar for NormR1
0
265
Member Avatar for Hemanth.Satkuri

Hi , Is it possible to have loaders in Swing. By Loaders i mean, showing a loader image with masking on the application till the data is retrieved from DB and displayed in TextArea. Just like we have ajax loaders Not allowing to access other screens in the application with …

Member Avatar for dmanw100
0
127
Member Avatar for DavidTPotterNY

My issue is that after public static void Head() { each of the following sets is highlighted red for an illegal start expression error. I've tried moving the bracketts around removing words like static or public. (I'm 3 classes into java). I just need help in getting that issue to …

Member Avatar for dmanw100
0
2K
Member Avatar for rahul.ch

import java.io.*; public class Mac extends Laptop { public static void main(String r[]) { new Mac().crunch(); } //insert code here } class Laptop { void crunch() throws IOException { } } The question is simple. Insert a code that will make the program compile. Answers are: `void crunch()` or `void …

Member Avatar for NormR1
0
215
Member Avatar for ganges

hi how to convert int into object in java kindly explain me with simple example have a nice time

Member Avatar for rubberman
0
69
Member Avatar for Pyler

I use dr java for linux to run my code. I've been running into a bunch of errors recently while running this simple program. The code compiles fine but whenever I run the java file, I get the error; Static Error: Undefined name here's my code; (I've got two files, …

Member Avatar for TrustyTony
0
2K
Member Avatar for Bemani_lover

Hello everyone. I'm in need of some help on how the compareTo method works. First I'll give you some background about it. This program was written in eclipse and it's a homework assignment. I'm trying to compare two Time objects and see which one is greater. here's the code import …

Member Avatar for Bemani_lover
0
182
Member Avatar for adityawkhare

I have developed a calculator gui using netbeans. I've a decimal button which i want to be pressed only once. Is there anything like single selection for jButton?

Member Avatar for JamesCherrill
0
63
Member Avatar for theQube

Gah. I wrote all this code thnking that it would work properly, but it doesn't. [code] //#13 //Reads N days worth of stock prices,and spits out the highest increase. //Created 6/30/03, 8:38 PM class StockWatcher { public static void main (String args []) { double today = 0.00; //price of …

Member Avatar for JamesCherrill
0
251
Member Avatar for gelmi

Is there anyway on how can i get a more accurate coordinates? i'm doing a project for our school, the problem is i dont know how to get the right coordinates that i would like to create. Thanks in advance :)

Member Avatar for JamesCherrill
0
106
Member Avatar for abhishek_s_n

My application has two parts; a server and multiple clients. This project has its implementation both on Windows(Swing) and Android. The Server sends a song which a client receives and starts playing; more like we watch videos on YouTube; streaming. Sending data in chunks and receiving the same is accomplished. …

0
131
Member Avatar for Neversleepin

Hi, i have a JComboBox in a small java program. if i see the properties of the JComboBox i can see SelectedIndex = -1 SelectedItem = null But i can't the name of each item and i have 5 items normally. Where can i see them in the properties? Thank …

Member Avatar for NormR1
0
136
Member Avatar for balagangadharm

Can any one suggest me the best and free Reporting Tool which supports java Thankx in advance

Member Avatar for stultuske
0
140
Member Avatar for mikias.kidane.9

I am trying to figure out how to increase array size... let say i created string array that can hold 7 names but the user wanted to enter more than 7... so i am trying to write a program that double my array size with out me changing it manualy …

Member Avatar for Taywin
0
1K
Member Avatar for im abcd

I have just started learning java and made an first mathematical interactive program which I wanted to distribute with my friends . But I am unable to run the .jar file . I do the following , I click on export - Runnable.jar - Main.class and select the other options …

Member Avatar for im abcd
0
463
Member Avatar for gunvesxco

i have a file.txt like this : 2X^2 + 5X+3=0 i want to save 2 to variable a, 5 to variable b, and 3 to variable c . . how i can do that . . ? tanks for your help . .

Member Avatar for gunvesxco
0
228
Member Avatar for Matth963

'm trying to pass a String from one class to another class but the result I'm getting is 'null'. I want to pass the String username from LoginFrame to HomeworkFrame; HomeworkFrame: public void loadSubjects (){ String item; try{ System.out.println(username); Scanner f = new Scanner (new FileReader (username + " " …

Member Avatar for Taywin
0
2K
Member Avatar for godzab

I am not sure how to explain this so I will give an example. If I were to have two arrayList like the one listed below: ArrayList<String> java = new ArrayList<String>(); java.add("1"); java.add("2"); java.add("2"); java.add("4"); ArrayList<String> lava = new ArrayList<String>(); lava.add("0"); lava.add("2"); lava.add("5"); lava.add("4"); how would i remove the duplicates, …

Member Avatar for JamesCherrill
0
292
Member Avatar for fmasroor

import java.awt.*; 02 import javax.swing.*; 03 import java.util.Random; 04 import java.awt.event.*; 05 import java.awt.Color; 06 import java.awt.Graphics; 07 public class actualstuff extends JFrame 08 { 09 private JTextField textField1; 10 public static int index=0; 11 public static Graphics gx; 12 public actualstuff() 13 { 14 Container container=getContentPane(); 15 container.setLayout(new FlowLayout()); …

Member Avatar for piyush09
0
174
Member Avatar for mrjoli021

How do i read a txt file into a char array. what i have so far only give me blank lines String fname = "c:\\game.txt"; char data; int row = 2; int col = 4; char[] matrix = new char[row]; private void openFile() { try { FileReader reader = new …

Member Avatar for NormR1
0
211
Member Avatar for visham

Hello Guys, We need your recommendation for a good java reporting tool(open source or commercial) which meets the following requirements: 1. Embeddable in java web application(via reporting tool API calls) 2. Low run-time cost 3. Output to pdf/html 4. Has report designer/drag and drop etc. 5. iPad/iPhone friendly(if possible) Thanks

Member Avatar for abel.genesis
0
364
Member Avatar for mclam

/* For this program you will be working with strings. You are to ask the user to input a string. Then, make (and print out) the "pig latin like" version of this string by using the following rule: 1) words beginning with a vowel (A, E, I, O, U) , …

Member Avatar for JamesCherrill
0
162
Member Avatar for iash

i m trying to do a music cd databse. i done most of it bt i dont kno how to do the search methord..can any 1 help this is my program import javax.swing.*; import java.util.ArrayList; import java.io.*; import java.io.IOException; public class Cd { public String ArtistName; public String CdName; public …

Member Avatar for JamesCherrill
0
110
Member Avatar for rozina11

need help to create an array of CDs, where the data comes from a text file, and then sorts the array content by artist name, then title,releaseyear,length in ascending order of artists name.(2 classes main and Cd ) When sorting is done is written a new fill to disk, with …

Member Avatar for JamesCherrill
0
283
Member Avatar for Andyjava

Hello all. public class LoginFragmentActivity extends SherlockFragment { EditText e1 = null; EditText e2 = null; Button b; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInatanceState) { View view = inflater.inflate(R.layout.login_layout, container, false); e1 = (EditText) view.findViewById(R.id.reg_email); e2 = (EditText) view.findViewById(R.id.reg_password); b = (Button) view.findViewById(R.id.btnLogin); b.setOnClickListener(new View.OnClickListener() { @Override …

Member Avatar for Andyjava
0
119
Member Avatar for connoisseur2010

Good day guys, I'm a java EE developer. I'm to do my final year project in java EE but have no idea of something tangible to earn me a good grade. Any suggestions. Would love to get a feedback by the end of the day. Thanks.

Member Avatar for peter_budo
0
197
Member Avatar for jimmyjhonrubio

import java.util.Scanner; // Needed for the scanner class /** Chapter 2 Programming Challenge */ public class Wordgame { public static void main(String[] args) { String name; //The user's name String age; //The user's age String city; //The name of a city String College; //The name of a college String Profession; …

Member Avatar for JamesCherrill
0
207
Member Avatar for cisumma

Hello I am using Apache derby embedded database: I have been using a system to display records from the database described in "DisplayInstructorAvailableNowJTable.java". it allows the result set to create a model from a prepared statement. I have only uncovered the tip of the iceberg concerning JTABLE. I am not …

0
137
Member Avatar for WDrago

All, I am working on my first forms app (using NetBeans). I don't like to mix GUI code with app code, so I have my main class, GUI class and core code class nicely seperated. When the user clicks a button on the GUI form it calls a method in …

Member Avatar for WDrago
0
214

The End.