35,618 Topics

Member Avatar for
Member Avatar for anki7

Hi, I need to generate a dynamic bar graph in excel.The code is in java and related technologies.On my site when a click a button 'generate graph for selected values' i should to get a bar graph in excel.Since the values selected can change and also the data associated with …

Member Avatar for priya89
0
246
Member Avatar for Osaid9

hello i'm trying to code 'Save Button' which saves all the information in a file this is what I did: private void SaveButtonActionPerformed(java.awt.event.ActionEvent evt) { java.io.File file=new java.io.File("File.txt"); try { java.io.PrintWriter output = new java.io.PrintWriter(file); output.print(this.DateObject.getText()); output.print(this.NoteObject.getText()); output.close(); } catch (FileNotFoundException ex) { System.out.println(""); } } the problem is if …

Member Avatar for tux4life
0
4K
Member Avatar for Violet_82

HI all, I am having a little problem with the following program. Here are the files: Player.java: import java.text.DecimalFormat; public class Player { private String name; private double average; public Player(String name, double average) { this.name=name; this.average=average; } public String getName() { return name; } public double getAverage() { return …

Member Avatar for Violet_82
0
191
Member Avatar for 03hasnam

Hi, I have something wrong at table_academicMouseClicked() method which results me with a java.lang.NullPointerException error. basically trying to compare the surname in Jtable and look it up on the database to select the corresponing record so that I can set the label to the value from database. So when a …

Member Avatar for Taywin
0
494
Member Avatar for sciwizeh

Hello, I have some java code I want to port to C++, and first class in the Heirarchy has me stumped. I'm trying to port a simple parsing framework as an exercise to figure out how it works internally, and almost everything in the framework requires, uses, or is `PubliclyClonable` …

Member Avatar for sciwizeh
0
433
Member Avatar for IcyFire

Hi, i'm making a server client piant program that send what is painted on the server to the client(and vice versa). this program is supposed to use instruction based transmission of the image. i have a server client program that sends what is drawn on the server to the client …

Member Avatar for IcyFire
0
303
Member Avatar for Darshan5

Hello.. I created a project in netbeans. I have a JFrame form. It has a JTable in it. I want to insert the database data in this JTable. Can you please help me. I would appreciate if you show me a sample code. Please dont tell me to add rs2xml …

Member Avatar for tux4life
0
64
Member Avatar for vipin.luhach

***How To UpDate JTable on Delete Command and if given id don't match with database then a message show "id is not available " My Codes as follows:-*** private void Sf_Reg_delete_ButtonActionPerformed(java.awt.event.ActionEvent evt) { String str2 = JOptionPane.showInputDialog(null, "Please Note that this Reg No is not generated again : ","Enter Reg …

Member Avatar for tux4life
0
192
Member Avatar for zlloyd1

This is my program so far: package allin1; import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Allin1 { JFrame frame = new JFrame(); JPanel panel = new JPanel(); JButton b1 = new JButton("Exit"); public static void main(String[] args) { panel.add(b1); //THIS IS THE PROBLEM?? } } The error I am …

Member Avatar for tux4life
0
332
Member Avatar for 03hasnam

I am unable to execute the editProfile() method in MainMenu class. The purpose of the method is to be able to extract the bean values and display them on the empty textfield. I am not sure if i did it correctly. any recommendations for any changes to editProfile() method. public …

Member Avatar for 03hasnam
0
509
Member Avatar for Osaid9

i'm trying to show date in a text field this is what I did java.util.Date date=new java.util.Date(); this.DateObject.setText(date); and its wrong... please help & thank you.

Member Avatar for JamesCherrill
0
170
Member Avatar for sid78669

I was trying to set a UniqueIdentifier based on Long. The objective was to give a certain custom Object a unique identifier in order to allow me to store them in a hashmap. I saw someone trying to use the most significant bits. So I realized that the addition of …

Member Avatar for ~s.o.s~
1
464
Member Avatar for reuel3

What's wrong with the following code? public void fillByteArray(InputStream s, byte[] b, int offset, Integer numReads, int readAmount){ while (numReads > 0){ s.read(b, offset, readAmount); offset += readAmount; numReads--; } }

Member Avatar for bguild
-1
244
Member Avatar for utkarshsahu

My aim is to fill a 3x3 grid of Jtextfield in java swing with values and position of entry in that grid sourced from a text file.I made a file named aa.txt. Its contents are:- a1-3 b3-9 c2-4 a1,b3,c2,... are names of textfields in grid and numbers separated by hyphen …

Member Avatar for JamesCherrill
0
375
Member Avatar for utkarshsahu

I am attempting to make a TicTacToe in java using Swing. Instead of using buttons for mark(x and o) placing on 3x3 grid, i used textfield(variable name- pos) to specify position of mark entering and another textfield(var name- val) to take value to insert it into the position which i …

Member Avatar for tux4life
0
207
Member Avatar for nickerst

So I have been working on this project for quite some time and I can't figure out why I keep getting an "Illegal Start of Expression" error. I tried moving the variables above the main method and that only returned the same error but instead of the error occuring at …

Member Avatar for nickerst
0
321
Member Avatar for IcyFire

I have this paint program and i'm having a very silly problem. I'm trying to set the paint area to west position using border layout but when i do that it doesn't show up when i run the program. if i set it in the center it shows up. everything …

Member Avatar for IcyFire
0
697
Member Avatar for Aditya_4

class Emp { int name, emp_no, addrs, ph_no, deprtmnt, post, project; Emp(int a, int b, int c, int d, int e, int f, int g) { name=a; emp_no=b; addrs=c; ph_no=d; deprtmnt=e; post=f; project=g; } Emp(int a, int b, int c, int d) { name=a; emp_no=b; addrs=c; ph_no=d; } Emp(int a, …

Member Avatar for Aditya_4
0
204
Member Avatar for mukororokudo

Hello Everybody, i'm having a problem with my code. I'm making a word reverser program though I'm not that much knowledgeable about java. The output that I'm aiming for is something like this "olleH dlroW" by inputting "Hello World" string. I'm getting the output that I'm looking for when I'm …

Member Avatar for JamesCherrill
0
229
Member Avatar for Viped

Hi. I have a problem with launching my application as applet. The game runs fine as an application. my applet code: package net.viped.breakout; import java.applet.Applet; import java.awt.GridLayout; public class GameApplet extends Applet { Core core = new Core(); public void init() { setLayout(new GridLayout()); add(this.core); } public void start() { …

Member Avatar for jalpesh_007
0
248
Member Avatar for eikal

hello, i have made the code below. however, when comparing the two strings they are not equal when in theory i thought they would be. String word="abc"; String d=""; d += "a"; d += "b"; d+= "c"; if(word==d) { System.out.println("IS EQUAL"); } When i just print out string d it …

Member Avatar for eikal
0
252
Member Avatar for sparkthesunoff

I need to write a program that can draw stuff on a frame, let's say, trees. Their IDs, colors, positions etc. are in a **txt file**, line by line, the first word of the line is the name of their type which will be the name of the subclass. These …

Member Avatar for tux4life
0
803
Member Avatar for dharmil007

Hi guys i m doing an EJB project on Library Management using NetBeans Out of which the first Step create a "CREATE ACCOUNT" page & get all the details from User & store it in Database. Using JSP for this. Everything is created, but when i try to Click Submit …

Member Avatar for subramanya.vl
0
3K
Member Avatar for vishalonne

Hello I have 5 jtextfield in my jframe with 5 jbitton. I just want to move the cursor from jtextfield1 to jtextfiled2 and then to jtextfield3 and so on when I press tab key. This can be done in C# very easily by setting the tab sequence while designing the …

Member Avatar for Rajshri Patil
0
111
Member Avatar for trishtren

hello, Iv been trying to write a java program to read an image from a list of images in a file I.E: * File * Filename * Image1 * Filename * Image2 * Filename * Image3 The problem i am having is that the filename's are string objects followed by …

Member Avatar for vishalonne
0
146
Member Avatar for bsunkel

Hey there! I have been trying to get all my JTable cells to be not Editable so you can't change the info displayed on the JTable. It sounds easy to do but I cant seem to do it. Any help would be appreciated Thanks!!

Member Avatar for sdasdasd
0
8K
Member Avatar for vikarna

Hi, i want to read the data from text file and write to excel file. if some one has ready code written then please share with me.

Member Avatar for peter_budo
0
2K
Member Avatar for alaky

I have a problem with tika parser that can't read temprory zip file that it had created . this StackTrace is : java.lang.InternalError: jzentry == 0, jzfile = 139750727169136, total = 235, name = /tmp/apache-tika-8076182698055047262.tmp, i = 176, message = null at java.util.zip.ZipFile$2.nextElement(ZipFile.java:322) at java.util.zip.ZipFile$2.nextElement(ZipFile.java:304) at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:158) at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:615) at …

Member Avatar for stultuske
0
210
Member Avatar for Petranilla

Hi Everyone, Happy 2013 to all.I'm using JOption to print a table, how do I align the columns? I am using a single variable for the JOption. Example: QTY ITEMS UNIT PIRCE AMOUNT 1 Milk-Anchor 100.00 100.00 10 Del Monte-Tomato Sauce 1000.00 1000.00 Any suggestion will be great. All the …

Member Avatar for Petranilla
0
119
Member Avatar for Java is King

So, I'm trying to make a game of tic tac toe using JFrame and JPanel. This creates the board image 3x3 . package book; import javax.swing.JPanel; import java.awt.BasicStroke; import java.awt.Color; import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.Graphics2D; import javax.swing.JButton; public class Beginning extends JPanel { public void drawBoard(Graphics d){ int r …

Member Avatar for tux4life
0
197

The End.