32,199 Topics

Member Avatar for
Member Avatar for minimee120

My assignment was to create a Directory Lookup, that prompts the user for an input (inputting a number i.e. 5) and the program returns whether the input number is in the .txt file or not. Having some trouble, have re-edited my code numerous times already, but here's what I've amounted …

Member Avatar for Taywin
0
135
Member Avatar for ali11

import java.util.Arrays; import java.util.List; import java.util.Random; class DynamicArrayOfInts { private int[] storage; private int size; private final int INITIAL_CAPACITY = 8; private final int GROW_FACTOR = 2; public DynamicArrayOfInts() { storage = new int[INITIAL_CAPACITY]; size = 0; } private void rangeCheck(int index){ if (index < 0 || index >= size) …

Member Avatar for Taywin
0
242
Member Avatar for Hemanth.Satkuri

Hi, I have a file uploaded in DB. Can i download it from Swing application. By Download I mean with options like Open,Save,Cancel and set the response type based on the file's extension. Thanks in Adv. :)

Member Avatar for NormR1
0
240
Member Avatar for softswing

Hi, Please help me in how to use findbugs static tool clouds in eclipse.

0
65
Member Avatar for jrosh

I want to draw a chart similar to area chart in asp.net. possible to use js / jquery. I tried out java script libraries that are available to draw charts, But those has no chart per my requirement. But I couln't find any pure code examples to draw a chart. …

Member Avatar for jrosh
0
160
Member Avatar for sapure

I admit it's a part of an assignment but I don't understand what the assignment require in this part. This program is supposed to read 10 numbers from the keyboard and then the application findMax will take one single command line argument. If you invoke findMax 1, it will print …

Member Avatar for sapure
0
314
Member Avatar for FUTURECompEng

What is the running time for the following recursive function: pubic static int Sum(int [] a, int start, int end) { if ((end – start) = =0) return a[end]; else { int mid = (end + start) / 2; return (Sum(a, start,mid) + Sum(a,mid+1,end)); } } Can someone please explain …

Member Avatar for FUTURECompEng
0
296
Member Avatar for k22mac

I am taking an intro level java programming class and i am a little stuck at the moment. I'm trying to use a the replace method. My objecti with this program is to gather a phrase from the user and then have it print the same phrase with some characters …

Member Avatar for dimasalang
0
112
Member Avatar for codechrysalis

Ok so this is my code so far: I have a issue where near the end in the getSum() method I need a way for the all the methods that i have that ask for the user input need to go into the respective arrays that i made in the …

Member Avatar for NormR1
0
208
Member Avatar for gotto

I am given the amount of data and the time used. It asks for the time complexity. It is in a Big-O packet Below is the first problem given Algorithm A Data Time 1000 .003 2000 .012 4000 .048 8000 .192 Please explain how to get the time complexity. Thanks!

Member Avatar for gotto
0
392
Member Avatar for i.nikei

hello. i am a new learner. i build some program that able to read .doc file and pass them to Cache database. i've done the passing part. but the problem is, how can i diffrentiate between paragraph and table content? for example, i have **Section A** as a title and …

Member Avatar for NormR1
0
133
Member Avatar for jemz

Hi,i have a program and i created into a jar file,but the problem is when i am going to remove the jar file into the directory where my java classes and pictures resides,when i click the jar file the picture of my buttons are gone.can you help me please how …

Member Avatar for jemz
0
411
Member Avatar for abders

The GUIFlowLayout is giving me some trouble, the GUIFrame works fine. I have copied this from the Java programming book which I am using (Introduction to JAVA, eight edition, by Y. Daniel Liang). I get red error lines under 'setLayout', all of the 'add' words, and all the 'setTitle, setSize' …

Member Avatar for abders
1
287
Member Avatar for mohamed moamen

I'm do program that when i press by mouse in any cell in table that print the cell position in a text field but i have a problem that's do nothing need help plz note ( I'm use jfram form and drage in it jtable and jtextfield ) [CODE] public …

Member Avatar for mKorbel
1
148
Member Avatar for ibthevivin

My Java is pretty rough. So far I've completed one class of Java all the way up to basic array functions. I've asked my Professor to explain it, but he talks with so much jargon. Could someone explain to me why this program spits out the "24" when I run …

Member Avatar for richard89AZ
0
252
Member Avatar for javalover

Hi frnds!!! Am new to ubuntu .. Am using netbeans7.1 .. I need to connect my java application with mysql server... I dont know how to configure netbeans for that.. I tried to configure mysql server in netbeans itself through (Right Click Databases-> select Register MYSQL Server-> select Admin Properties) …

Member Avatar for Ajinkya Jagtap
0
223
Member Avatar for Stjerne

Hello again, This time, I want to create a simple function where you choose a date with JSpinner, and next to it, I want a textfield where you can enter the time. I've already created a JSpinner with both date and time, but it kind of looks bad, but that's …

Member Avatar for Ajinkya Jagtap
0
324
Member Avatar for london-G

When I run the application my labels are al spaced out, however in the design they are fine. Do you have any ideas why? Also when I preview the jframe everything looks fine. Thank you

Member Avatar for Ajinkya Jagtap
0
105
Member Avatar for will.penfold.71

private ArrayList<Student> students; public void loadFromFile(String x){ try { FileReader reader = new FileReader(x); Scanner in = new Scanner(reader); int lineNumber = 1; while (in.hasNextLine()) { String name = in.nextLine(); int score = in.nextInt(); students.add (new Student(name, score)); lineNumber++; } in.close(); Hey Guys i am getting unknown errors when trying …

Member Avatar for jalpesh_007
0
158
Member Avatar for abdulhamid1
Member Avatar for jamesmadison43

I am supposed to create an arraylist from an integer[] array, iterating the elements in the list in decending order ex: int[] array = {1,4,2,3,5}; goes into array list to become {5,4,3,2,1} how do i even being to do this (without first sorting the array and then putting it into …

Member Avatar for jalpesh_007
0
299
Member Avatar for jalpesh_007

dear all, I am working on hashmap and treemap. At the starting of my program i have declared two map,m1 and temp,both are hashmap. At starting point both map contains same kay value pair. At some instance of program, i want to change the value in temp, remove some key …

Member Avatar for jalpesh_007
0
739
Member Avatar for delta_frost

What is the component called in a GUI ? I am designing an application where I need to show certain usernames besides along with the points they have scored in a game.I don't want to do it in a table.I want to use the component shown in the picture below.But …

Member Avatar for Taywin
0
118
Member Avatar for sk8ergirl

Hello my question how can I split array of string to another string using for loop for example if i have this array of string joe,DE2300,A sam,RM4901,B allay,SM9800,D << name, course, grade I want to split the array to another array so the output will be //I want this list …

Member Avatar for sk8ergirl
0
295
Member Avatar for oneoderja

Define an integer array ‘arr’ with size 2 in the main method and initialize the two elements in ‘arr’ to be 1 and 2 Write a method ‘swap’ and pass the ‘arr’ into the method, swap two elements of the ‘arr’ in the method Print out all elements in ‘arr’ …

Member Avatar for Taywin
0
154
Member Avatar for vishu.bhavsar

Hi all, I have come across the class JDatePicker which allows user to pick the date from the calender. But, I actually don't know how to use it. I have searched on the Google but didn't find much helpful information. Can anybody help me on this? Any help(e.g. examples) will …

Member Avatar for london-G
0
162
Member Avatar for Yoink

I need to create a Point and Rectangle class for a homework assignment and I'm unsure if I have the right idea with what im trying to do. In my Point class it much have a accesor and mutator, and also a distance method which is what im haveing trouble …

Member Avatar for NormR1
0
240
Member Avatar for enterpise

I'm not sure. This the right way to calculate percentage ? Here's my method public class percent extends Operation { @Override public Value calculate(Value key, Value value) { //BigDecimal result = key.getValue().divide(Value.hundred, Value.SCALE, BigDecimal.ROUND_UP); return new Value((key.getValue().divide(value.getValue()).multiply(Value.hundred))); // return new Value(result); } @Override public String getSymbol() { return "%"; } …

Member Avatar for enterpise
0
110
Member Avatar for jamesmadison43

import java.util.Arrays; import java.util.List; import java.util.Random; class DynamicArrayOfInts { private int[] storage; private int size; private final int INITIAL_CAPACITY = 8; private final int GROW_FACTOR = 2; public DynamicArrayOfInts() { storage = new int[INITIAL_CAPACITY]; size = 0; } private void rangeCheck(int index){ } private void ensureCapacity(int size_wanted) { int max_capacity …

Member Avatar for Taywin
0
176
Member Avatar for vishu.bhavsar

Hi all, I am creating one GUI application in java. I need to make menubar visible when particular panel is made invisible. Is it possible by creating an event which will be triggered when panel is made invisible? Can anybody help me? Thanks in advance!!!

Member Avatar for JamesCherrill
0
201

The End.