36,051 Topics

Member Avatar for
Member Avatar for ceyesuma

I have a combobox on a panel that changes tables on the panel. How would I get it to repaint if this panel was on a JTabbedPane in a InnerFrame in a JDesktopPane? It repaints but after I switch for one tabs and then back to the said tab. thanks.

Member Avatar for JamesCherrill
0
88
Member Avatar for sivaprakashm

[code]BarRenderer barrenderer = (BarRenderer) plot.getRenderer(); DecimalFormat decimalformat1 = new DecimalFormat("### %"); barrenderer.setItemLabelGenerator (new StandardCategoryItemLabelGenerator("{2}",decimalformat1)); barrenderer.setItemLabelFont (new Font ("Bold", Font.PLAIN, 12)); barrenderer.setItemLabelsVisible (true);[/code] In eclipse I got the StandardCategoryItemLabelGenerator cannot be resolved to a type in the below line StandardCategoryItemLabelGenerator I import import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; there also i can get redline below …

Member Avatar for JamesCherrill
0
185
Member Avatar for jsp_

Hi, I have to create a JSP page wherein files are to be uploaded to a specific location. This location is unique for each user and is thus stored in the database. Thus it consists of 2 steps 1. Reading the location from the database. 2. Uploading the file to …

0
46
Member Avatar for revenge2

Hi there, is it valid to have a java class name and file as [CODE]public class DVD extends Items{[/CODE] and [CODE]public class CD extends Items{[/CODE] where its all in capitals? -thanks, sorry for the short question.

Member Avatar for JamesCherrill
0
213
Member Avatar for evak77

I need my rows to allign like this and my code is below, can someone tell me what I should do. Loan 1 15,000 12% 60 $333.67 $5,020.20 $20,020.20 Loan 2 15,000 10% 48 $xxx.xx $x,xxx.xx $xx,xxx.xx Loan 3 15,000 08% 36 $xxx.xx $x,xxx.xx $xx,xxx.xx [CODE] import java.math.*; import java.text.*; …

Member Avatar for peter_budo
0
93
Member Avatar for rowdyboudy

Hi Guys, As you will see from my code snippet below, I have a masked text field that only allows the user to input a number between 0 and 9. I have wired up an event as when the user inputs a number I need to extract the number and …

Member Avatar for peter_budo
0
106
Member Avatar for hemant.patel

when i register one databse at this time also insert to second database.I have two database on one server db1_main and db2_rg. this two database have tabal fields are different so it this posibale? if yes so what can i do?plz reply me. Hemant

Member Avatar for ~s.o.s~
0
27
Member Avatar for Fisher78

Write a program that simulate a die roller. The user should type in the number of the throws. Let the program count how many ones, twos, threes... are in the series. In the end the program should write down how many ones ... that was and also figure out the …

Member Avatar for javaAddict
0
122
Member Avatar for indu_ss4

Hi all! i'm developing a web application in jsf 2.0 with GlassFish server.Database is MySql.Https protocol. My problem is that when i request for a page in my application sometimes the browser displays the source code of that page and not the html view for the user. It is not …

0
114
Member Avatar for soUPERMan

[CODE] StringTokenizer st = new StringTokenizer(line); while (st.hasMoreTokens()) { String wordIn = st.nextToken(); if (wordIn.endsWith(".")) wordIn = wordIn.replace('.', ' ').trim(); if (wordIn.endsWith("?")) wordIn = wordIn.replace('?', ' ').trim(); if (wordIn.endsWith(",")) wordIn = wordIn.replace(',', ' ').trim(); String result = bd.searchBase(bd.getWords(), wordIn, 0, bd.getWords().length -1); if (result != null) System.out.println("Word found \n"); else …

Member Avatar for masijade
0
769
Member Avatar for Yathini

Hi I am using Jreports for my task when i click the link instead of report excel should come for tat i hand code in jsp as "jrs.result_type=4" bcoz it launch excel its launching but i need to fetch 50,000 records bit it fetch 20,000 ... Any suggestions? [code=html]</head> <body> …

0
64
Member Avatar for FoziaZafar

can any1 kindly help me how can i wirte in database using JDBC, i had alredy made connection with me database,,, so plz tell me how to write in database access file?

Member Avatar for jwenting
0
121
Member Avatar for ceyesuma

Hello The ActionPerformed will not unload the viewPort to load the new viewPort that holds a table. is there a way to reload the table? The first actionPerformed supplies the table but the next will not remove table and add the new one. [code] package view.content.panels.guide; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; …

0
58
Member Avatar for zango

So the following is where I think the problem lies in my code: [CODE]public void actionPerformed(ActionEvent i) { int temp; double newtemp = 0; String inputString; inputString = infield.getText();//pulls the number that was entered in the input field temp = Integer.parseInt(inputString);// makes a new variable to handle the input //tells …

Member Avatar for javaAddict
0
755
Member Avatar for johndoe444
0
46
Member Avatar for ketanbembi

Hi i am new bie to swings. if i have a JTable. And i want to add number of rows with different number of columns like Employee1, Software Developer, swings Employee2, software developer What is the way of adding rows having different number of columns to a JTable Thanks.

Member Avatar for DeadSoul
0
157
Member Avatar for Vivek Varma

im a little on the weak side in loops.....n hearing that programs are solved by bright people here.....i am requesting help with a few programs in loops...i dont understand them...and am expecting you people to help me 1- ******* _***** __*** ___* __*** _***** ******* NOTE-(_) MEANS SPACES 2-Write a …

Member Avatar for genevish
0
73
Member Avatar for SikoSoft

Howdy, First off, I should say that I am jumping on posting this issue much quicker than I normally would - but I'm not really in a patient mood now, and I'm far from being a fan of anything the W3 has done. Anyhow, I am in the process of …

Member Avatar for SikoSoft
0
175
Member Avatar for ramesh866

hi everyone am a beginner in jsp side. i am working on a project where the UI is designed in HTML, validation in servlet and i want to store the relevant information in SQL server. I have glass fish server. how can this be done. please guide me

Member Avatar for ramesh866
0
40
Member Avatar for extemer

guys me trying to use switch statement in this program but cant get to end... i tryed to convert string into char but dont knw why it still not getting right... please help me [code]import javax.swing.*; import java.io.*; class HappyBirthday { public static void main(String[] args) throws IOException { String …

Member Avatar for extemer
0
256
Member Avatar for thompsonSensibl

Hi folks. I'm making a GUI. It contains multiple JPanels. I'm having trouble making contents of other JPanels (than the first/main JPanel; others are subclasses to the first one) visible... From the first JPanel, I call a draw method to a second JPanel. This second JPanel's draw method displays a …

Member Avatar for thompsonSensibl
0
111
Member Avatar for Arkheart

I have been using java for some time, and can code back end stuff with ease. GUI's on the other hand I Find hard to deal with. So anyway, I'm making a game (text based), and would like to implement a console type GUI. I have already made a jframe …

Member Avatar for Arkheart
0
130
Member Avatar for MaydayLove

Hey guys, I'm writting a program that reads a list of names from a file called name.txt and instert these names directly into a linked list in alphabetical order of [B]last[/B] names. For example, if the text file has these names: Henry Johns III, Albert Einstein, Henry Johns II, Mary …

Member Avatar for peter_budo
0
169
Member Avatar for zkelvin2010

I have to write a program that creates a text file that contains a power of two table in HTML format. Also the instruction are [COLOR="Red"]The file should start with something like: [/COLOR] <html><head> <title>Powers of Two</title> </head> <body> <table border cellpadding=5> <tr><th>Power of 2</th><th>Value</th></tr> [COLOR="red"]Each line of the table …

Member Avatar for jwenting
0
83
Member Avatar for zreed

I need to code a program for my friend and it has been giving me some difficulties. This needs to have two classes, one called Tester and another called Game. And the data in the Game class needs to be pulled to the tester class after the calculations are finished. …

Member Avatar for jwenting
0
295
Member Avatar for Confu

hi.....um reading killer game book.and when loading external models it imports ncsa portfolio package.....i dont know where i could find this package and whether this package is included in java3d api??thanks in advance for any help.......

Member Avatar for quuba
0
75
Member Avatar for madonline

CAN SOMEONE TELL ME HOW THE console eraser work in the below PROGRAM PART...............describe the LOGIC??????????? [code] //Creating and hiding password. ConsoleEraser consoleEraser = new ConsoleEraser(); System.out.println(); System.out.println("(Please enter the common Password)"); System.out.print("PASSWORD : "); BufferedReader passin = new BufferedReader(new InputStreamReader(System.in)); consoleEraser.start(); String passWord = passin.readLine(); consoleEraser.halt(); System.out.print("\b"); //Password matching. …

Member Avatar for madonline
0
525
Member Avatar for Abdel_eid

i have created a system for a library using java using input and output jframes but i need to access that project using a .exe file by just a double click...how can i do that

Member Avatar for DeadSoul
0
317
Member Avatar for sharathk60

my i have wrote my code is like this but m not to get get proper out put here is my code [CODE] System.out.println("Enter Date of Birth dd/mm/yyyy"); DataInputStream in=new DataInputStream(System.in); String dob= in.readLine(); String[] dob1=dob.split("/"); int year=Integer.parseInt(dob1[2]); int month=Integer.parseInt(dob1[1]); int date=Integer.parseInt(dob1[0]); System.out.println("Date : "+date+ "Month : "+month+" year :"+year); …

Member Avatar for JamesCherrill
0
118
Member Avatar for thebluestar

I have tried to include a JavaScript asp file into a vbscript asp file, but I did work? I know because they are "incompatible", but I don't know how to solve it!

Member Avatar for hielo
0
89
Member Avatar for Daffodil_Thursday

Hi, New to Java & hoping you can help me with an error message I am getting. The compiler says "Cannot find symbol - variable evt" for the first line of the below code. [CODE]if (evt.target==calc) { clickedCalc(); return true; } else return super.action(evt,obj); for(int i=0;i<12;i++) result[i].setText(" "); // clear …

Member Avatar for Daffodil_Thursday
0
483
Member Avatar for thepussy

[code] import java.util.Random; import java.util.Scanner; public class AssignmentMenu { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int loop = 0; String randomLetters[] = { "a", "b" , "c", "e" , "d" ,"f" , "g" , "h ", "i", "j" , "k" , "l" , "m" , …

Member Avatar for thepussy
0
149
Member Avatar for sharathk60

Hi , i am new to this concept of OSGi and felix and ipogo please give me the solutions for my doubts 1> why we use OSGi -- where to use and how to use Osgi.? 2> what is felix and why to use that and how to use? 3> …

Member Avatar for sharathk60
-1
76
Member Avatar for AcidG3rm5

Hi all, i'm doing a AES encryption with a library found on sunjava. There is a small problem i hit while making a test. Firstly i used "nv3456789123456o" as my key to encrypt. However, for testing purpose, i'm trying to use a different key to decrypt the message to see …

Member Avatar for jwenting
0
669
Member Avatar for ShahzebN

Hey I'm supposed to make a program using the HSA application console I'm using Ready to Program 1.7.1 The program I'm supposed to make could be any kind of game/activity Some examples are connect4, poker, reactionTimeMeasurement, other card games I've seen source codes for these programs online, but I must …

0
25
Member Avatar for ceyesuma

Hello There is no error and no table. Could someone find the missing code needed to render the table? How do I Verify that outocommit is OFF? output: [code] in personalDataTable: Supports Scroll headers: ADMIN_UID headers: ADMIN_PASSWORD headers: ADMIN_LNAME headers: ADMIN_MNAME headers: ADMIN_FNAME headers: ADMIN_GENDER headers: ADMIN_AGE headers: ADMIN_START_DATE headers: …

Member Avatar for ceyesuma
0
116
Member Avatar for Serrafine

I've looked over the forums but I can't find anything to help me. I've tried out some of the code but I still end up with a blank image. What I'm trying to do is allow the user to draw an image in a JPanel and then I want to …

Member Avatar for Ezzaral
0
2K
Member Avatar for ceyesuma

Hello I am using : [icode] conn = ddf.getConnection(); setConn(conn); ps = (PreparedStatement) conn.prepareStatement( ModelUtils.getXMLResource("selectAdmin"),ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ps.setString(1, thisUser); rs = ps.executeQuery(); [/icode] and [icode] public int getRowCount() { try { rs.last(); return rs.getRow(); } catch (SQLException ex) { Logger.getLogger(AdminPanel.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); return 0; } } [/icode] and it is …

Member Avatar for ceyesuma
0
262
Member Avatar for vani.golakoti
Member Avatar for jwenting
0
67
Member Avatar for DanJack90210

Hey everyone, I am writing a Java program and I want to present the user with a settings window when they run a function in the main GUI so they can set the parameters which are used in the function. Ideally what I would like to do in the main …

Member Avatar for DanJack90210
0
218
Member Avatar for bmb11

Hello, I am trying to build a gui with two textfields, a textarea, and a few buttons. The two textfields are for the user to enter in random numbers (one number in each textfield). I then want the person to be able to hit a button that will then take …

Member Avatar for bmb11
0
191
Member Avatar for smart99

Hi all i am new in j2ee but have good experince in asp.net what is the best book or web to start java [U][/U]

Member Avatar for NP-complete
0
73
Member Avatar for xzero_x

[CODE]import java.util.Date; class House implements Cloneable,Comparable { private int id; private double area; private Date Whenbuilt; public House(int id,double area) { this.id=id; this.area=area; Whenbuilt=new Date(); } public String toString() { return id+" "+area+" "+Whenbuilt; } public int compareTo(Object o) { if(area>((House)o).area) return 1; else if(area<((House)o).area) return -1; return 0; } …

Member Avatar for NP-complete
0
90
Member Avatar for mozten

Need help with my chat program as it is not working. Right now, its supposed to be like a server-client "chatroom". But I have a problem with sending a message that one client sends to the server, to everyone. Here is what I have so far, can anyone point out …

0
67
Member Avatar for scream2ice

I'm trying to convert a String that I've read from the first line of a text file to integer this is how: String="8 12 10" and this is what I'd like to have: int x=8 int y=12 int z=10 parseInt doesn't work because it gives me some other number (perhaps …

Member Avatar for Abdel_eid
0
248
Member Avatar for Ajantis

Hello :) Suppose I input an int value with Scanner sc = new Scanner(System.in)... and I want to count how many divisors that value has, how would I proceed in "recognizing" a divisor? if ((input/2)%10 == 0)? I'd prefer doing this recursively somehow. Can someone help? :) Best Wishes!

Member Avatar for Ajantis
0
83
Member Avatar for karindra
0
30
Member Avatar for ntlgnce

Hello I have a windows XP media center 2005 Pc Its been a while since I used it. But heres whats going on with this. The computer boots normally, When I get to the desktop, I cant copy and paste, or click and drag, anything on the computer. The network …

Member Avatar for gerbil
0
424
Member Avatar for electricrain

i have been asked to make phone book console application in java using collections/data structure i have done some of it. i am having problem that i have to store firstname,lastname,cellnumber,emailaddress etc in such a way into collection so that if some one wants to search phone number from phonebook …

Member Avatar for JamesCherrill
0
632
Member Avatar for Clawsy

Hi, I have a few simple questions regarding sending SMS from my PC to my moble phone. I have two libraries which should be able to send SMS messages: [CODE] import com.simplewire.sms.*; public class send_text { public static void main(String[] args) throws Exception { SMS sms = new SMS(); // …

Member Avatar for jwenting
0
987

The End.