32,204 Topics

Member Avatar for
Member Avatar for bangor_boy

[CODE] private JButton[] buttons; private static final Character firstChar = 'A'; private static final Character lastChar = 'D'; /** Creates a new instance of ButtonPanel */ public ButtonPanel() { buttons = new JButton[4]; setLayout(new GridLayout(2,2)); Character label = firstChar; for (JButton b: buttons) { b = new JButton("" + label); …

Member Avatar for jon.kiparsky
0
169
Member Avatar for Neversleepin

Hi, i'm trying to copy all txt files from a directory into one file to another directory. But i have the following error: "FileStreamsTest: java.io.FileNotFoundException: . (Accès refused)"" My txt files are located in the project folder of NetBeans. here is my code: [CODE]package FileStreamTest; import java.io.*; class FileStreamsTest { …

Member Avatar for bibiki
0
995
Member Avatar for Ambislm

This is my sample application which provides result as follows: [CODE]Array Values : arr[0][0] :6 arr[0][1] :0 arr[0][2] :0 arr[1][0] :0 arr[1][1] :0 arr[1][2] :0[/CODE] am using the jQuery Highcharts: [CODE]chart = new Highcharts.Chart({ chart: { renderTo: 'container', defaultSeriesType: 'column' }, title: { text: document.chart.chartTitle.value }, series: [{ name: 'USA', …

0
81
Member Avatar for shack99

Hey again, I'm having another problem unfortunately. We were asked to create a tree that has binary tree properties as well as max heap property. (take A(7),C(8) and B(3) ; the tree should be so that the it should alphabetically represent a binary tree and numerically represent a heap) I …

Member Avatar for jon.kiparsky
0
13K
Member Avatar for aligajani

How do I put the jar file in eclipse inside the workspace folder so it does not have to be re linked or re path changed when I use it in another computer. Currently, my problem is that even when I keep the JDBC MYSQL connector (jar) file in the …

0
85
Member Avatar for mbouster

I have the following problem and I dont undesratnd how to use arralists to implement. I have a customer class which I want to hold some primitive data types as name , id , address etc. To implement this using arraylists I must declare it as below? [CODE]Arraylist Customer =new …

Member Avatar for jon.kiparsky
0
225
Member Avatar for ajst

Hi guys, I've been looking into reflection and was wondering if anyone had any good tutorials or a good use for it. I understand how it works but can't think of an example of when it would actually be used. A website with a task that needs reflection to solve …

Member Avatar for ajst
0
152
Member Avatar for sumeetdesaeee

I am new to JSON... I have been told to use it with XStream in my project.. I searched on net... But, I did not get any satisfactory information.... So, can anyone please tell in simple language what is JSON n basically why is it used?

Member Avatar for sumeetdesaeee
0
35
Member Avatar for sirlink99

I have a problem with this code and I do not know what is causing it. [CODE]// The "ArrowKeys" class. import java.applet.*; import java.awt.*; import java.awt.event.*; public class ArrowKeys2 extends Applet implements KeyListener, Runnable { int x = 50, dx, y = 50, dy, a = 0, score, total, locx, …

Member Avatar for sirlink99
0
116
Member Avatar for satish.sahoo

Hello I want to develop a program in which I query a string to any search websites like Yahoo,Bing etc.. and get search results(only the websites) to display in a list box.So is there any way to get the search results ? Thanks From Satish

Member Avatar for masijade
0
86
Member Avatar for Hakoo

Hello All, I have confusion in command Class. Its constructor has 3 parameters. First 2 parameters I can understand. but [CODE]Command.Screen[/CODE] and priority parameter I could not understand. I tried to Google also, and refer different kind of ebooks, but still i cant understand. So please help me.

Member Avatar for Hakoo
0
203
Member Avatar for ranjani jai

I have a label,4 radio button.I have retrieved data from sql.I need to display the retrieved question in label and its 4 option in each of radio button.I got it working to display one question.my trouble is in button click.when next button is clicked question should change...any more ideas is …

0
61
Member Avatar for rahini
Member Avatar for juniper2009

Dear All First of all I wish you a very happy new year. I have been trying to understand the depreciation matters. As you can see in the codes below, There are 3 handleEvent methods used as pressbutton action , radio button selection action and dropdown list selection action. Now …

Member Avatar for masijade
0
156
Member Avatar for ranjani jai

I am working for online examination project. my work is to generate random number without repetition. i tried and i am getting numbers to be repeated sometime.... I need to know how to check the repetition in the generated number. random r=new random(); for(i=0;i<10;i++) { int j=r.nextint(10); System.out.println(j); }

Member Avatar for ranjani jai
0
650
Member Avatar for NoviceChrilill

HI, I have now for more than 24 hours tried to figure out how I return the index number of the second smallest integer in an unsorted array. Some how, I do not get the index number returned, can any one see what I´m missing? As the program runs now, …

Member Avatar for unique72
0
587
Member Avatar for java1

how do i go about making a java music player? i have very basic knowledge in java and i learn best when i jump into a project..which in this case is a music player i would like it to play mp3 files with a nice looking GUI unfortunately...i have no …

Member Avatar for mrnutty
0
122
Member Avatar for mikeandike22

ok i want to make a program to show a teacher at my school so i can get into computer Ap which teaches you java(but they say u have to know stuff to get in it makes no sense i am in highschool). here is some seudocode and the code …

Member Avatar for Nmanpure Pkr
0
228
Member Avatar for JavaStudentCode

Dear All, I'm taking a course online for school on how to code with Java. My current assignment is to have the computer read in a text file and make it split it into 5 different arrays. I am really bad with Psuedocode so if you answer like that it …

Member Avatar for Katana24
0
896
Member Avatar for java666

Hi, I need help with an assignment for a class I'm taking. The assignment requirements are as follows: 1.Carefully study the class structure in Products.java. Here is Products.java: [CODE]abstract class Product { protected float price; // return the price of a particular product abstract float price(); } class ComputerPart extends …

Member Avatar for java666
0
795
Member Avatar for sariberri

Pleaseee help me guys. I can't figure out why the elements in my array are null. I'm reading in from a file and take each line and saving it as a variable in the object and then adding the object to the array. This is what I have so far...when …

Member Avatar for Akill10
0
197
Member Avatar for makeUbleed

I'am beginner in Java, and I'am having a lot of problems while typing or making the sum of numbers. The fact is that I want to calculate the sum of pressed numbers until I press -9999, meanwhile when I press -9999, I want program me to show the sum of …

Member Avatar for javinpaul
0
179
Member Avatar for hanvyj

I am trying to refer to the class a nested class is 'in'... The 'this' keyword refers to the nested class, so I need something like super.this (except not at all like that) :/ I think the code below describes what I am trying to do: [CODE]public class Nest { …

Member Avatar for hanvyj
0
99
Member Avatar for Avengerofsok

Hi, This is my first forum post and I'm very new to both the daniweb and programming community. I've been working on a project for a month or so and it involves clicking JButton to change the values of the text associated with the JButton clicked. Everything runs fine except …

Member Avatar for hanvyj
0
370
Member Avatar for Janu Sam

Hi I am new to Java. I am trying to develop a tool in which I am trying to download a file from a link. When I go to that link using my java program, IE is opened and its default File Download window is showing. But I need to …

Member Avatar for Janu Sam
0
261
Member Avatar for rohit2

How can we set a default path in our system to save a downloaded file in the "File Download" dialog box of Internet Explorer using a java program?

Member Avatar for masijade
0
76
Member Avatar for dangari

Hi guys. I have previously been developing a Java application using 2 Windows Vista PCs that both have MySQL as the database. I have always created a user for each PC (specifying their IPs as allowed hosts to connect) on the other and then in the application the code for …

Member Avatar for masijade
0
153
Member Avatar for christos312

Hello to all. I have build a Java GUI application and now i want to convert and transfer it to an applet. I assume that whatever i have in [CODE]public void main[/CODE] will now go to the init() method of the JApplet. Now the problem is to embed it to …

Member Avatar for masijade
0
181
Member Avatar for rohit2

Can any one help me how to make a Java Application GUI independent of screen resolution.. Now my application uses jFrame and it gets problems when resolution of screen changes.. plz help...

Member Avatar for masijade
0
204
Member Avatar for Geowil

[code] //Address Book Part 1 //IT 215 //George Williams import java.util.Scanner; class menuOperations { //Initilize Arrays to store information String[] fNames = new String[5]; String[] lNames = new String[5]; String[] dAddress = new String[5]; String[] dCity = new String[5]; String[] dState = new String[5]; int[] dZip = new int[5]; int[] …

Member Avatar for masijade
0
477

The End.