32,204 Topics

Member Avatar for
Member Avatar for abhi_elementx

Hello guys. I am doing a swing application wherein I m using a DefaultTableModel. Here's my code: [CODE] DefaultTableModel tab = new DefaultTableModel(){ @Override public boolean isCellEditable(int r, int c){ //if(c == 10) {return true;} return false; } }; private JTable jt = new JTable(tab); [/CODE] The JTable will diplay …

Member Avatar for abhi_elementx
0
103
Member Avatar for Upsilon

Hi guys, Just a question I think many people like myself would like to know the answer to. I have been using the Graphics2D class and it works great, however now I want to do some 3D things. I would like to know how to place ellipsoids in 3D space, …

Member Avatar for BestJewSinceJC
0
255
Member Avatar for VernonDozier

I am trying to learn GridBagLayout. I've gotten the hang of it in many respects, but I am having serious problems when the first row has element(s) with a gridwidth greater than 1 or the first column has elements(s) with a gridheight greater than 1. I'm trying to make a …

Member Avatar for VernonDozier
0
402
Member Avatar for ckillackey

Hey guys, I think I have this mostly figured out but i'm still getting some errors, I'm not sure if it's a syntax thing or if I called out a variable wrong. For some reason eclipse is saying that my variable [B]average[/B] "may not have locally been declared" which doesn't …

Member Avatar for ckillackey
0
272
Member Avatar for ddaudi8

Hi there, I'm new to java. And I would like to get data that I have in a Ms Access database and sending to a excel spreadsheet using java. I've search the web and I keep finding the ohter way around. Could anyone provide me with a sample java code …

Member Avatar for JamesCherrill
0
122
Member Avatar for doha786

As a java beginnners what i incline to do for my program almost get solution from this site. Right now i need a small help to get file name or full path for output files of my program. so far my program is running as a search engine to find …

Member Avatar for doha786
0
113
Member Avatar for Mel1976

I am trying to get this finished, but it seems everything I do to fix it, I get even more errors. Please help me figure this out, I am having a lot of problems with this particular program. Below is my program and build errors, can someone let me know …

Member Avatar for BestJewSinceJC
0
103
Member Avatar for get2tk

Write a program which uses a for statement to simulate 120000 rolls of two dice. 'Keep track' of the number of times each possible outcome (a total in the range 2 to 12) is rolled using 11 integer variables. After all the rolls output a table showing the number of …

Member Avatar for BestJewSinceJC
0
86
Member Avatar for neutralfox

Hello everyone, Can someone please explain to me the meaning of the code below: [code] public class Client extends javax.swing.JFrame implements Runnable { // constructutor public Client( String host, int port ) { . . . new Thread( this ).start(); } public void run() { something.... } } [/code] This …

Member Avatar for JamesCherrill
0
120
Member Avatar for dhr

hey can any one help me?? i have 2 develop a code to find the "lowest and unique" number from a array..i thot of sorting them and then comparing the lowest number with othe numbers but i m feelin it wont work...pls help me out...

Member Avatar for BestJewSinceJC
0
820
Member Avatar for neutralfox

Hello everyone, I got a question on synchronization, hope someone will be able to give me a clear explanation. [code] public void sendToAll( String message ) { ..... synchronized( outputStreams ) { ... ""statement block"" } } [/code] outputStreams is an object here. I made some research and I found …

Member Avatar for neutralfox
0
97
Member Avatar for sivak

write the javascript code to hide a particular label in c# .net..can any one tel me?

Member Avatar for ddanbe
0
77
Member Avatar for mkadiri

Im stuck on my loop program, I have to create a loop program for arrays which only stops if a user inputs quit or the user has input 1000 entries, the program then has to sort the arrays in order of composer. I've tried so many different kinds of algorithms …

Member Avatar for mkadiri
0
120
Member Avatar for gabec94

I am trying to write a program that calculates the value of pi from the infinite series of pi = 4 - 4/3 + 4/5 - 4/7 + 4/9...etc. As you can tell, the numerator stays at 4, while the denominator goes up incrementally in odd numbers, if the program …

Member Avatar for gabec94
0
1K
Member Avatar for peter_budo

[B]This is not a question just small challenge[/B] if you interest in improving provided solution and feedback for me. I just went back to some assignment I did at university and one of these been design phone book for mobile device with use of Java Microedition (JME). At the time …

Member Avatar for peter_budo
0
328
Member Avatar for hkansal

Hello, Currectly I was doing an assignment where I was connecting to remote unix boxes from a windows system and some response from them. The response is something like [CODE] att1,att2,att3,att4\n val01,val02,val03,val04\n val11,val12,val13,val14\n ... ... [/CODE] This response comes to me as a long StringBuffer. Then I have to render …

Member Avatar for masijade
0
87
Member Avatar for Miyuki Suzuki

Good Morning all, I need some help with loading a file into a sybase IQ table with the "LOAD INTO" statement. I have never used it before and I cant seem to get myhead around how I am supposed to implement it in my java app. I have a stateless …

Member Avatar for Miyuki Suzuki
0
109
Member Avatar for jacline

a GUI application that presents a game based on a 4 by 4 matrix of buttons.One of the buttons (selected at random) "hides" the prize. A status bar at the top of the window shows the number of guesses. When the prize button is pressed, the status bar shows "You …

Member Avatar for jacline
0
799
Member Avatar for ivatanako

[code]import java.io.*; public class getLowestValue { public static void main(String[]args) throws Exception { DataInputStream input=new DataInputStream(System.in); System.out.println("Get lowest value "); int a[]=new int[10]; int x =0, i=0, j=0, tmp=0; // display and get inputs [5] for (x=0;x<5;x++){ System.out.print(x+" Enter a number: "); a[x] = Integer.parseInt(input.readLine()); } // sorting for (x=0;x<5;x++){ …

Member Avatar for jasimp
0
209
Member Avatar for syuk

DEAR JAVA EXPERTS. can u help me? i dont know how to do the next move.... i want to write code that can make each object of the class Book can hold the following information about a book: title, up to four authors, publisher, ISBN, price, and number of copies …

Member Avatar for BestJewSinceJC
0
217
Member Avatar for jacline

Design and implement a simple GUI application (or applet) that displays the graph of a quadratic function, Ax2 + Bx. Below the plot should be two sliders which allow the user to interactively set the values of A & B, the display being updated continuously in response to any changes …

Member Avatar for jacline
0
129
Member Avatar for doha786

i am very new in java. in GUI class i have code like this : [CODE] public void actionPerformed(ActionEvent e) { if(e.getSource()==listButton){ ArrayList<String> list = new ArrayList<String>(); list.add("Orange"); list.add("Apple"); list.add("Pineapple"); list.add("Lemon"); list.add("Pear"); for(int i=0; i < list.size(); i++) { String s = list.get(i); { textArea.setText(s+"\n"); } }[/CODE] but its showing …

Member Avatar for javaAddict
0
107
Member Avatar for ippomarley

hi guys, I am having trouble with this code, cause i get an infinite loop. I made nexTxtFile the variable name of the txt file i am creating and writing text to. i want to be able to get user input untill the user does not want to enter anymore …

Member Avatar for verruckt24
0
110
Member Avatar for aodpreacher

I have a Class and then a made a sub class that would check if the letter "a" is in the string. i don't know how to call the subclass i made. i want to insert the subclass object into a StringDetail array but i keep getting an error. i …

Member Avatar for aodpreacher
0
151
Member Avatar for doha786

in C language i learned Precision paramater to show how many decimal point to print... in java how to do this precision for double, float etc....................

Member Avatar for VernonDozier
0
84
Member Avatar for easytrucker45

I am having problems getting my program to compile and run. Newbie from the word go. The main problem is I have all of the code but I cannot make the other classes go with the main class. Any help would be great. Here is the code that I have …

Member Avatar for easytrucker45
0
248
Member Avatar for linhngoc2100

I have a homework that only uses loops and selections. I do not know how to do it. Here is the topic: Write a program that prompts the user to enter the number of students and each student's name, score. Finally, display two students have the highest scores. Thank you.

Member Avatar for GDICommander
0
103
Member Avatar for vidaj

Hello I'm building my own html parser in python, and have ran into some problems. First off, I'm using python 3, so I can't use the old bundled sgmlparser, or beautiful soup and could not find windows binaries for lxml, so I'm rolling my own. It is for my master …

Member Avatar for vidaj
0
1K
Member Avatar for becdudek

hey i am meant to write a method to display a number of prime numbers specified by the user. here's my code and i know its prob all wrong and there are much easier ways to do it but i just wanna know what to do to make it compile …

Member Avatar for rahul8590
0
153
Member Avatar for joshmo

I have two .java files and I want to access a variable of a method in one of the files and use it in another. However, I dont want to call the whole method and I dont want the method to return a value...I'll try to illustrate below [code=java] [COLOR="Red"]//file_A.java[/COLOR] …

Member Avatar for javaAddict
0
3K

The End.