32,199 Topics

Member Avatar for
Member Avatar for abar_sow

I need a java code for downloading files from the internet ..For example I want to download doc,pdf files from the internet means i have to do it through my code ..So can anyone help me

Member Avatar for peter_budo
-1
854
Member Avatar for ceyesuma

Hello and thanks in advance for your time. Trying to learn how to throw App Exceptions. Is there any way to get this exception from properties so I can pass it to a JOptionPane? Model Resources UserException=Subscription failed. \ Please try another email address. ProfileException=Must Select a Profile \ UnenrollException=Unsubscription …

Member Avatar for ceyesuma
0
119
Member Avatar for escme

Okay so I'm supposed to write a report describing the classes and interfaces I will use to implement a popular online photo management system called flickr ([url]http://www.flickr.com/[/url]). I don't need to implement any method but just figure out the design based on [url]www.flickr.com/tour[/url] section of this site. I must have …

Member Avatar for peter_budo
0
77
Member Avatar for n_joan

I have a variable that contains the name of another variable. I intend to read the contents of the variable name. how?

Member Avatar for n_joan
0
112
Member Avatar for jemz

hello can you help me when i click the add button it will not add to the database.it will generate an error..can you help me please hoping for your positive responds...here's my code,please see my attachment.... [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.JPanel.*; import java.sql.*; public …

Member Avatar for jemz
0
204
Member Avatar for born star

rectangle r1=new rectangle(); rectangle r2=r1; whats the working of second line here

Member Avatar for kvass
0
76
Member Avatar for AdamWolf
Member Avatar for Tiger Woods
0
59
Member Avatar for nici0306

I have three classes in the program. This is a part of my assignment. I am doing it for the first time; so you might find something stupid in there.. as i have just tried to get the output my way or based on the assignment requirements. I have one …

Member Avatar for nici0306
0
166
Member Avatar for laveena

i hv written code of seraching specific folder on user choice with threading implemented. but im getting nullpointer exception at l.statsWith() in thread class two and not with normal searching [CODE]public class onlyfolder { static String z,l,w,e; static String y; static File f; static JFrame frame; static JPanel panel; static …

Member Avatar for cale.macdonald
0
1K
Member Avatar for jnthn205

Hey guys. I have a tic tac toe game that plots random X's and O's on a 2d matrix array called theBoard[row][col]. I want to check to see if one X is placed on 1 spot, and if another point is plotted in the same spot, to check if it …

Member Avatar for jnthn205
0
4K
Member Avatar for lwschjang

I'm pretty lost on this. I have no idea how to get my program to work. Basically, when an option is selected a price should show up in the text box automatically. Thank you all for your help. Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JComboBox cannot be cast to javax.swing.JTextField at …

Member Avatar for lwschjang
-1
4K
Member Avatar for Privoxy

Morning People I seem to be having a pretty big issue with a buffer I have that is reading a text file and acting upon the results of the file, As of now, the buffer reads each token in the file, and stores each token into a variable, this is …

Member Avatar for BestJewSinceJC
0
98
Member Avatar for BuhRock

I have to create a program that makes a lottery like game. My teacher wants me to use the constructor to initialize all the fields but I can't seem to get it to do that. Everytime I put the fields in the constructor initialized, I get compile errors. So right …

Member Avatar for BestJewSinceJC
0
193
Member Avatar for JavaGyrl

Hello! I am having a bit of difficulty calling a function in my class Image. The point of the class is to generate a 2D array of Color instances, then do various things with it. Within my test code, my editor simply will not allow me to call any methods …

Member Avatar for JavaGyrl
0
192
Member Avatar for jaredleo999

I have: [CODE]JButton b1 = new JButton(); b1.setForeground(Color.BLUE); the button labelled b1 turns blue and all is working, However is it possible to use some function like: String ButtonColor = "BLUE"; b1.setForeground(Color.(ButtonColor.getText()));[/CODE] I ask this because i want to get the colour from a different class.. Any help appreciated thanks!

Member Avatar for peter_budo
0
176
Member Avatar for FreddieMerqury

I am writing here, asking you for a little help. I have assignment in Java for my class in programming. I should create Java Applet and make animation. The animation should consist of several bouncing figures (balls, triangles, squares etc.) and when clicking on them different events should happen. One …

Member Avatar for Ezzaral
0
140
Member Avatar for ben1

The group has now been divided, my problem scenario is the following: There are 2 packing machines, which can pack any type of food, however this needs to be done one at a time. Each food type takes 10 secs to pack. The packing machines get the food from the …

Member Avatar for ben1
0
120
Member Avatar for grady-lad

Hi I am new to java and I am stuck on an assignemnt and im looking for some suggestions basically i have 8 buttons delcared as an array and i would like to double a number enetered in a textfield when clicking a certian button ..... i want each button …

Member Avatar for white feather
0
88
Member Avatar for DemarioBolden

Need Help Solving this problem... How do I start my for loop to display the 7 district aestricks

Member Avatar for javaAddict
-1
104
Member Avatar for mick18

Hi just wondering could anyone help me with this tic tac toe game i am developing it must be a GUI and include AI for the computer i originally made this tic tac toe game without the GUI but i am just having problems converting it to a GUI as …

0
48
Member Avatar for cindy s

Hello guys......Cindy here I am trying to get my program working and I am getting really frustrated. I am writing this program to familiarise myself with arrays, methods & loops so i can improve my Java skills. Im not lazy guys and have tried searching yahoo ,answers, forums and google …

Member Avatar for Katana24
0
119
Member Avatar for macpac

Can someone help me with this please. [CODE]import java.util.Scanner; import java.text.NumberFormat; public class ChargeAccount { private int additional_charges; public int balance; private double min_payment; private int interest; private double new_balance; //initialise Charge Account public ChargeAccount(int previous_balance, int add_charges); { balance = previous_balance; additional_charges = add_charges; Scanner scan = new Scanner …

Member Avatar for moutanna
0
103
Member Avatar for softdev

Hi Guys, I've noted that when using Netbeans, .jar file is created when you build your application. if i want executable jar file of my application, can i just take the same generated jar file, or should i create my own .jar via the command prompt. I mean whats the …

Member Avatar for softdev
0
111
Member Avatar for ibosstech

I am new to this place and have a lot of questions to discuss with all here. Starting with a problem that i am currently stuck in..:) I have a small project for which i am using net beans and want to generate the graph as I am having values …

Member Avatar for ibosstech
0
138
Member Avatar for bubunchan

i had stuck with this question cz i'm newbie for java programming. i hope ur helping... The Vote class has the data field count to count votes, and the methods [I]getCount(), setCount(), clear(), increment(), and decrement()[/I] for reading and handling the votes, as shown in class diagram below. The [I]increment …

Member Avatar for bubunchan
0
156
Member Avatar for white feather

[CODE]void age() { boolean isValid = false; Calendar user = null; while (!isValid) { System.out.print("Enter Date (mm/dd/yyyy): "); DateFormat df = new SimpleDateFormat("MM/dd/yy"); String s = In.in(); Date date = null; try { date = df.parse(s); } catch (ParseException e) { System.out.println("Date error"); } user = Calendar.getInstance(); user.setTime(date); if (user.getTime().getTime() …

Member Avatar for white feather
1
116
Member Avatar for whimsical1987

I have to work on a method called extract feature which has to check for the pattern i pass to the method in the matrix I pass This is an example pattern = {{0,100,0},{255,255,255},{0,100,0}}; Though I pass any different pattern it has to check for that pattern in the matrix …

Member Avatar for whimsical1987
0
787
Member Avatar for Imberto

Hello, i'm new to java and i need to read a file of strings into an array and then sort them but i can't figure out how to do either. i can do it with ints and doubles but i can't with strings. if anyone could help me i'd be …

Member Avatar for vchandra
0
122
Member Avatar for xsach

[CODE]import java.io.*; import java.util.*; import java.io.FileWriter; import java.io.IOException; public class Dirtrav { public static void main(String args[]) { // String rootDir="C:\\Projects\\PerfBVT'\\W6_TopicVsQueue_8.2.0.0.74_040110\\"; File directory = new File("C:\\Projects\\PerfBVT'\\W6_TopicVsQueue_8.2.0.0.74_040110"); identifydir(directory); } //File directory = new File("C:\\Projects\\PerfBVT'\\W6_TopicVsQueue_8.2.0.0.74_040110\\"); public static void identifydir(File di) { File[] files = di.listFiles(); if (! di.exists()) { System.out.println("Invalid path"); return; …

Member Avatar for masijade
0
109
Member Avatar for chequer

Using WindowsXP Pro SP3 Problem with javascrip I have installed Javascrip Ver 6.0.190.4 When I try to email a site to submit a query I enter the question but when I click on [NEXT] I get this error:mJavascrip:Void ( ) can you help

Member Avatar for chequer
0
62

The End.