36,051 Topics

Member Avatar for
Member Avatar for kekkaishi

hi, i've been trying, without success, to maintain the style of the text in a jTextPane when it is copied into the clipboard. what I want is to copy the text in a jTextPane with styles (eg: bold, italic) and to be able to paste it into MS WORD with …

Member Avatar for kekkaishi
0
108
Member Avatar for sergiolio

Election Applicatin of Classes & Objects `create an election 2010 program with the following details: User Interface: Design your own user interface for the ff modules/methods: >User Leverl(admin & user) for admin,can manipulate the whole part of the program for user can only view voting part. >Registration: Assuming that there …

Member Avatar for javaAddict
0
145
Member Avatar for skank111

how to create a java program that will accpt an integer from 0 to 9999 and then convert this into words?

Member Avatar for masijade
0
36
Member Avatar for skank111
Member Avatar for Kimmelivim

This is my java assignment for school and I have done most of the work. But I still have some other features I have problems with adding. This is a guessing game where to program requests a number from the user between 1-1000. It will tell the user if the …

Member Avatar for Kimmelivim
0
99
Member Avatar for tyson.crouch

G'day guys, My boss has just asked me to develop a small CRM system. Now, writing a simple SQL Insert is not something im a stranger to, however for some reason i cannot seem to get this working. I've included all necessary libraries, and tested the actual sql statement in …

Member Avatar for masijade
0
609
Member Avatar for Sunshineserene

Hi, I want to know to rows and columns of numbers from a text file. I do not want to read it as a string, but one number (including numbers with decimal) by itself. I tried using FileInputStream and DataInputStream, but I'm not really good at it. I don't know …

Member Avatar for tong1
0
2K
Member Avatar for srinivaslvn

[CODE]<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="Player1" width="200" height="100"> <param name="URL" value="<s:property value="adFilePath"/>"> <param name="http://path_to_the_video"> <param name="AutoStart" value="0"> <param name="ShowControls" value="1"> <param name="ShowStatusBar" value="1"> <param name="ShowDisplay" value="1"> <param name="stretchToFit" value="1"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="200" height="100" src="<s:property value="adFilePath"/>" filename="<s:property value="adFilePath"/>" autostart="0" showcontrols="1" showstatusbar="1" showdisplay="0"> </embed> </object>[/CODE] Above code in the place file name i am …

0
86
Member Avatar for badae

Hello Everyone! Im making program using java that would look like the (attached file).. If i will choose an item in the combobox(with 3 choices) the corresponding Price would automatically appear on the Price Jtextfield, im having a difficulty if i should use switch or if then else or both..? …

Member Avatar for badae
0
76
Member Avatar for vincent0625

Hi, I have some problem in solving my homework in java language. I was asked to produce a boolean array and implement some operation. private boolean[] set; How can I add integer into the array list?? thanks

Member Avatar for NormR1
0
61
Member Avatar for Voldemort2

I have just started programming in java. I am planning to do a project on barcode reader. Can you suggest from where shall i start? I want to learn about manipulating pixels. How can i convert the set of pixels into the array of pixels? I am in desperate need …

Member Avatar for Voldemort2
0
152
Member Avatar for Slowly

Hi, This code snippet works. Except for one line, which I cannot find the solution to. public void read(Scanner in) { Pattern p = in.delimiter(); in.useDelimiter("\n"); while(in.hasNext()) { in.next(); lineCount++; } //rewind pointer - how!! ?? in.useDelimiter(p); while(in.hasNext()) { wordCount += 1; charCount += in.next().length(); } } ...it appears, much …

Member Avatar for Slowly
0
5K
Member Avatar for bhanu1607

Here i created four buttons. If i clicked second one i should able to draw a line. please tell me what is the mistake.. [code = Java]import java.awt.*; import javax.swing.*; import java.awt.event.*; class Polygon extends JFrame implements ActionListener { JFrame f; public JPanel jp1,jp2,jp3; JButton b1,b2,b3,b4,b5; JTextField txt; int x,y; …

Member Avatar for NormR1
0
153
Member Avatar for bhanu1607

This is code for, a smiley have to move on the screen from one place to another. But in this code Smiley create but it is moving. Please tell my? Is there any wrong in my code. import javax.swing.*; import java.awt.*; class CreateSmiley extends JPanel { int x = 0,y …

Member Avatar for bhanu1607
0
101
Member Avatar for Bahubali

I tried it by using table.addRow statement.plz i need to add on action performed by ADD button.plz can any suggest me.

Member Avatar for kramerd
0
62
Member Avatar for GDICommander

Hi, everyone! I'm having grave difficulties with generated JAR bundles from Maven OSGI plugin in Netbeans. When running the bundle from Netbeans, all works fine. But when I'm taking the generated JAR file from Maven and I'm using it outside Netbeans from command prompt and with Felix (java -jar bin\felix.jar, …

0
87
Member Avatar for sw8revenge

i really need some help i need a atm program that has 5 default client and a program that creates or add client in the program!! JAVA CONSOLE hope u can help me :)

Member Avatar for kramerd
0
54
Member Avatar for prashanth.p.560
Member Avatar for kramerd
0
56
Member Avatar for NewOrder

[CODE]import java.io.Console; import java.util.ArrayList; public class IteratorEx5 { public static void main(String[] args) { Console console=System.console(); String movie=""; String Subscriber=""; String movieType=""; ArrayList<Subscriber> sub=new ArrayList<Subscriber>(); String stop; BlockBuster dvd= new BlockBuster(); while(true){ System.out.println("Enter the movies name"); movie=console.readLine(); System.out.println("Enter the movies name"); Subscriber=console.readLine(); System.out.println("Enter the movies name"); movieType=console.readLine(); System.out.println("Enter the movies …

Member Avatar for kramerd
0
188
Member Avatar for judgemental

Hi, I have done my ordering class. which contains all the components. My problems is how do I set picture as the background and maximize the picture size? either one of the way 1) i have a class that contains the picture program. How to connect the two program? the …

Member Avatar for JamesCherrill
0
122
Member Avatar for PDB1982

Why am I getting this error: [code] Please Enter 5 variables: Please enter value in slot 0:1 Please enter value in slot 1:2 Please enter value in slot 2:5 Please enter value in slot 3:4 Please enter value in slot 4:2 [COLOR="Red"]Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 at Duplicates.NumberCheck(Duplicates.java:32) at …

Member Avatar for PDB1982
0
92
Member Avatar for brave2010

my colleague give me his system that he did in jsp when he was in college which is simple online help desk but he didn't send me the database tables he didn't backup it said it was lost so he asked me to simply create my own db(i have no …

Member Avatar for psninja
0
90
Member Avatar for judgemental

hi, this is my code to display one textarea, textfield and label in the flowlayout. and 2*2 button /** * @(#)Gui.java * * * @author * @version 1.00 2010/10/5 */ import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Gui extends JFrame{ JButton b1=new JButton("one"); JButton b2=new JButton("two"); JButton b3=new JButton("three"); …

Member Avatar for tong1
0
102
Member Avatar for sciprog1

Hello Members, If possible, kindly let me know why I am not able to see the text in the buttons("Button" and "Button two!") when I run this Java program: [CODE]import java.awt.*; import javax.swing.*; public class Sample extends JFrame { private JButton b1, b2; private final Container container; public Sample() { …

Member Avatar for sciprog1
0
2K
Member Avatar for coco24

My professor said we have to write a page about how to trace this for(int count = 0; count <= 3; count++) for(int count2 = 0 < count; count2++) System,out,println(count2) Can somebody give me a general idea of how to trace this I know the answer is 0 0 1 …

Member Avatar for tong1
0
101
Member Avatar for allang

I'm stuck. I'm trying to wirte a very small animation applet. It is suppose to import 15 BMPs and then of course play them back in an animation. I have the BMP's stored in a seperate directory but think I have the path right. It seems I am continually getting …

Member Avatar for tong1
0
86
Member Avatar for doctorjo5

My project is as follows: 2. Modify the class NumberTest.java so that: a) The user is prompted to enter an integer and a double and the following information is displayed: a. adding the two number, b. subtracting the double from the int, c. dividing the int by the double, d. …

Member Avatar for doctorjo5
0
161
Member Avatar for shivana69

You are required to select interesting problem domain and do analysis and design (using UML) to provide an Object Oriented Implementation (using JAVA). The implementation must demonstrate usage of Object Oriented concepts: encapsulation, inheritance, polymorphism, etc. The application must have at least 4 classes. Please help i am not good …

Member Avatar for NormR1
0
100
Member Avatar for rayden150

I downloaded netbeans but i wanted it to be in another language is this possible to change, i really dont want to redownload it again... please help and thanks!

Member Avatar for coil
0
72
Member Avatar for pgset

this code is supposed to be a simple game. the computer picks a random circle in the 100 by 100 square of circles called the secret spot and when you hit a circle it says either go up go down go left or go right until you hit the secret …

Member Avatar for tong1
0
132
Member Avatar for pmark019

[CODE]import java.awt.*; import javax.swing.*; import java.text.NumberFormat; import javax.swing.JFormattedTextField; import java.awt.event.*; import java.text.*; public class Database extends JFrame { private JSplitPane splitPaneV; private JSplitPane splitPaneH; private JPanel panel1; private JPanel panel2; private JPanel panel3; private int X1, X2, X3, X4, X5, Y; private JLabel gradeL, equivL; private JFormattedTextField gradeTF, equivTF; private …

Member Avatar for NormR1
0
170
Member Avatar for New2Java2010

I am working on a homework assignment. The assigntment info is as follows: Write a grading program that helps to determine your letter grade based on your exam score. For example, when you put in exam score of 80, the program will determine you get a B. Please note the …

Member Avatar for NormR1
0
287
Member Avatar for kdott

hi all, i have a programming assignment where i read a text file through command line arguments. i then use that information to get a list of photos (just strings, not actual images) and a list of keywords that correspond to each of those photos. i am stuck on how …

Member Avatar for JamesCherrill
0
160
Member Avatar for PDB1982

I'm trying to find a way to search an array to see if the values entered bu the user are already in the array. For example, if numbers[0] = 1, and the user tries to input numbers[1]=1, then I want the program to kick an error back that won't allow …

Member Avatar for kvass
0
92
Member Avatar for klasiknonie

Gudday all. Im new to dis site and also new to java programming. I hav an assignmnt to write a program dat computes d grade point average of a set of eight courses and i dnt knw how to go abt it. I wil appreciate an urgent reply pls.

Member Avatar for NormR1
0
34
Member Avatar for subrat_p

I am a learner in java . I want to connect my MYSQL database table to a combo box. I created 3 combo box on my jpanel.When I select first two combo box items its automatically call the data base and show the particular content from my table in the …

Member Avatar for subrat_p
0
1K
Member Avatar for DJGvan23

I would be really nice if someone presents an idea of how to link mySQL with A Java Program.. Tried it many times but unsuccessful. An example would be much useful. Thanks!!!!!!!

Member Avatar for DJGvan23
0
69
Member Avatar for toshiro101

Write an application that reads a line of text from the keyboard and prints a table indicating the number of occurrences of each letter of the alphabet in the text. For example, the phrase To be, or not to be: that is the question: contains one "a," two "b's," no …

Member Avatar for NormR1
0
122
Member Avatar for handrews3583

Here is my code: [code] import java.util.*; public class SavingAccount extends BankAccount { // Begin public class SavingAccount extends BankAccount private double minAmount; public boolean withdraw(double amount) { // Begin public boolean withdraw(double amount) if (getbalance() >= amount + minAmount) { // Begin if statement super.withdraw(amount); return true; } // …

Member Avatar for JamesCherrill
0
271
Member Avatar for aro_kai

hey i had started coding in java.I want to display the pixels format of image with the following code but i get errors...Can anyone suggest my code?? [code]public void Pixelvalue(Image img){ int[] pixelss = new int[w * h]; PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixelss, 0, w); …

Member Avatar for JamesCherrill
0
192
Member Avatar for pavan146

Hi , can any one explain me this code public class Howcome { public static void main(String[] args) { System.out.println(“Bank of America”); [B][url]https://www.bankofamerica.com[/url][/B] System.out.println(“Online Banking”); } even though https:// BofA lyin as orphan string in between this codes compiles and executes fine..???

Member Avatar for pavan146
0
108
Member Avatar for churva_churva

[CODE]import java.util.*; public class EmployeeNames{ private String EmpYee []; private int count; int x; public EmployeeNames(int size){ String EmpYee []=new String [size]; count=0; } public EmployeeNames(){ this(10); } public boolean isFull(){ return count= EmpYee.length; } public boolean isEmpty(){ return count=0; } public void add(int x){ if(! isFull()) EmpYee[count++]=x; else System.out.println("\n …

Member Avatar for javaAddict
0
424
Member Avatar for patishere

how to randomize JLabel array? and how to put image in JLabel array?

Member Avatar for JamesCherrill
0
101
Member Avatar for Bhargavi V

Hi All, Can any one help me in editing a column value in a table and save the changes to the database I am usig a piece of code as follows [CODE] private void process() { // Wait Cursor. CBRCursor waitCursor = new CBRCursor(this); try { // Get the chosen …

0
56
Member Avatar for Vincent Addison

please can someone help me find the uses of the codes below and reference,the kind of book or the internet char At() sub string() toupperCase() tolower Case() equals() Startswith() endswith() equalsIgnoreCase() replace() compareTo() index of()

Member Avatar for JamesCherrill
0
98
Member Avatar for Bhargavi V

Can anyone help me in join the 3 combo boxes with filters The main idea is there are 3 combo boxes when we select an item in the first combo box the related items should apper on the remaining 3 combo boxes and when we select an item on the …

Member Avatar for Bhargavi V
0
339
Member Avatar for beginner21

im currently building a game who wants to be a millionaire..the interface is already done but there was an error..there was an incompatible types exception..here is my code..it says found java.lang.String but expected java.awt.event.ActionEvent..help please [CODE]public class MillionaireBoard extends JFrame implements ActionListener { private MoneyLabels a; private JLabel A; private …

Member Avatar for beginner21
0
211
Member Avatar for kdott

I have a scenario where i am given a file that contains info such as: (just a sample) img01.jpg|Washington DC|aquarium|puffer fish|seahorse img02.jpg|CHICAGO|AQUARIUM img03.jpg|Chicago|fish where the first section is the "image" (just a made-up name, not an actual image) and the rest of the words are keywords. ive been able to …

Member Avatar for NormR1
0
164
Member Avatar for ceyesuma

I am having a problem with running my Derby embedded db. I have to set the path and I tried the following commands. the first one is wrong and I would like to learn how to remove it.please. the other ones do not seem to work . I have a …

0
68
Member Avatar for josirucu

[COLOR=Blue][B]hi.i've written a program that loads #'s into an array and sorts them.The end user then inputs a number and the program is supposed to perform a sequential search for the input number and tell wether it was found or not found.I'm hoping someone canhelp me with my sequential search.binary …

Member Avatar for foxpro21
0
349

The End.