35,618 Topics

Member Avatar for
Member Avatar for pooran.c

import java.util.LinkedList; import java.util.ListIterator; import java.io.*; public class llist { public static void main(String[] args) { String abc="poo"; String[][] array_string; array_string= new String[10][10]; array_string[0][0]="123"; for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ array_string[i][j]=(String)j; System.out.print(array_string[i][j]); System.out.println(""); } } } } error is: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Cannot cast from int to …

Member Avatar for pooran.c
0
243
Member Avatar for jackmaverick1

Hi! I'm learning how to make a GUI in Java. I'm wondering how to add a JThingy (JLabel, etc) without the use of the add(NameOfJThingy); Because add(); isn't static, you can't use it in a static function (like main, which must be static). I've seen that the constructor can help, …

Member Avatar for JamesCherrill
0
150
Member Avatar for rohit2

Hi, I am new to Grails and Groovy. Currently I am running tests of my application using the command grails test-app. Just like in Java, now I want to pass some parameters as command line arguments. Is it possible in Grails. If anyone has idea, please share it with me. …

0
88
Member Avatar for JJHT7439

I have a quick question that I'm hoping someone can help me with on here. I have 2 2d int arrays that I create for a board state and a solution that look something like this: int[][] P1 = new int[][]{{0,2,0,0,0,0},{0,0,3,0,0,0},{5,0,0,0,0,0} etc. ect. They're 6x6 arrays and I need a …

Member Avatar for JJHT7439
0
135
Member Avatar for sakurayana

[code]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import java.util.*; public class Cinema extends JFrame { private JLabel lblName,lblIC, lblPN, lblPerson, lblTicket, lblTP; private JTextField txtName, txtIC, txtPN, txtPerson, txtTicket, txtTP; private JRadioButton rbA, rbB, rbC, rbD, rbE, rbF; private ButtonGroup radioGroup; private JCheckBox cbxA1, cbxA2, cbxA3, cbxA4, cbxA5, cbxA6, …

Member Avatar for jwenting
0
143
Member Avatar for yancouto

EDIT: My problem was solved. :) But I have a doubt, what is the most effective way to wait for something to happen in java? for example, if I want to wait for a boolean b to be true, does this below work? [CODE=java]while(!b) {} //stuff to do after wait …

Member Avatar for yancouto
0
130
Member Avatar for 080346

hello everyone i want to know how i can store the image in my database(PostGreSql pgadmin iii) using jsp and glassfish as a server. i have the following code but it go to exception at pst.setBytes(2,b)....... thnx [code] con = getConnection(); String exsistingFileName= "C:\\temp\\myimage.gif"; File file = new File(exsistingFileName); FileInputStream …

Member Avatar for kvprajapati
0
104
Member Avatar for blur0224

Hi All, I want to run a POJO within an EAR externally. I know this can be done from a servelet, but I'd prefer being able to do it from command line. Is this possible? Are there other options? Thanks!

Member Avatar for blur0224
0
70
Member Avatar for rushhour2

Hi all, I am having trouble with a prepared statement in my Java Servlet's data manager where it inserts a member into the database. I believe the syntax is correct, but I always seem to get the error: [CODE]SQLException: You have an error in your SQL syntax; check the manual …

Member Avatar for masijade
0
160
Member Avatar for sakurayana

hi, can u help me.when i click at the checkbox,the data in the checkbox should appear in the number ofperson textbox..but i cannot pass the data to the textbox.any solution...thanx in advance..here's the codes: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import java.util.*; public class Cinema extends JFrame implements …

Member Avatar for sakurayana
1
217
Member Avatar for vishal18

Hi everyone, I'm using jasper reports & i want to display total number of record/rows on jreport. please help me. thanks in advance !!!

0
59
Member Avatar for Poopster01

I have the following error on line 71 and I'm not sure whats wrong with that statment any explanation would be greatly appreciated. C:\Users\peter\Desktop\CSC 111\welch_lab4\welch_lab4.java:71: cannot find symbol symbol : method equalsIgnorCase(java.lang.String) location: class java.lang.String while (!(response.equalsIgnorCase(FLAG))) ^ 1 error Tool completed with exit code 1 This is the details …

Member Avatar for Poopster01
0
184
Member Avatar for newack

Hi, I want to build new Gui program for calculator. I did it in c# using MS visual c# 20100 express. Now I want to do it in java. I used jGRASP till now. Does jGRASP has any feature like visual studio to add buttons or something like that? or …

Member Avatar for cretaros
0
2K
Member Avatar for newbieha

Hello everyone. I want to change the background color of the button when I click it. the problem now is the only the last button works, but not the way I want to.(It changes color I click other buttons.) here is my button code. [CODE] for (int i=0; i<(5; i++) …

Member Avatar for newbieha
0
107
Member Avatar for catpoints

Hi. I am trying to display a JFrame containing a JLabel with an image, and I can't get the image to display. The text appears fine. I've done this before with no problem, so I have no idea what is wrong. I've tried everything I can think of to fix …

Member Avatar for catpoints
0
2K
Member Avatar for ckwolfe

Hi, sorry my title isn't very explanatory. What I need to do is to access a variable from a main function, in another function without using a parameter to do so. Based on the nature of the problem you might see why I would do this. (if there is a …

Member Avatar for JamesCherrill
0
139
Member Avatar for takui

Hi to all! I'm glab to be here and...I'm here because I need some help! ^^; Hope someone can give me an hand... I'm trying to study java using some books for beginners...and I gest stucked in an excercise... I've this: [CODE]class LogicalOpTable { public static void main(String args[]) { …

Member Avatar for takui
0
179
Member Avatar for jackmaverick1

Hi! I'm getting this error that says that I need another '}'... The problem is that I have all of the needed ones The error report is: "Syntax error, insert "}" to complete ClassBody"

Member Avatar for jackmaverick1
0
93
Member Avatar for jalpesh_007

This is problem of optimization. I want to create bipartite graph with weighted edge.. So i have created program. Please tell me how can i add weight to each of its edges and then from this i can calculate min. objective function. Please reply. [CODE]import java.io.*; class bip { BufferedReader …

Member Avatar for khamsinh
0
127
Member Avatar for TinyBelly

This is my GUI diagram book --> reservation --> payment [LIST] [*]I need to know what should i add if i wan to take total value from "book" class to use at "payment" class. help me TQ [/LIST] [CODE]public book () { double price = 12.00;[/CODE] Im using passing value …

Member Avatar for mKorbel
0
97
Member Avatar for vikram97

hello guys here is the situation am new to struts and jsp see i have a screen in which i have to enable the delete button which i did later in the corresponding code it was present in the business delegate now when i press the bbutton am getting this …

0
52
Member Avatar for red_ruewei

Hi all, First, apology if we created duplicate thread. we try to find relevant topic but no luck to find match and sorry we newbie with ireport but have basic with java. Here is my case. We manage to read ireport generated from jsp file with below code. The report …

0
129
Member Avatar for rithish

[CODE]import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class addition { InputStreamReader ins=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(ins); int a,b,c; public addition() { int a=Integer.parseInt(br.readLine()); int b=Integer.parseInt(br.readLine()); System.out.println("a="+a); System.out.println("b="+b); c=a+b; System.out.println("c="+c); } public static void main(String args[]) { addition a =new addition(); } } [/CODE]

Member Avatar for tomato.pgn
0
111
Member Avatar for cretaros

i managed to encrypt a password in wampserver but i also want to implement the same code in the login frame code so it can also encrypt what i have type so it became easy to be compared with the encryption in database, how to i embedd the code in …

0
54
Member Avatar for Naruto1

Level 2 Version B - Level 2 above plus  Use of classes and objects to store and manipulate the item data Example • Write a new class ‘Event’ to represent details of sports event objects. A sports event consists of (for example) the event title, year and venue (“Olympic …

Member Avatar for Naruto1
0
701
Member Avatar for liphoso

TEX] I have this code but can not get it to display the numbers the way i want. I want the display 1 21 . . . n-2)......1 (n-1).......1 n (n-1)... 21 My code is[/TEX] [CODE]public class print{ public static void parttens() { int w=4,t=0; int k = 1; int[]array=new …

Member Avatar for dononelson
0
128
Member Avatar for aanders5

How do I split a string by 2 characters? lets say I am parsing a html page, and you have lots of tags such as <html> <title> blah bahl </html> If I wanted to split by <title></title>, how would I do that? my goal, is to get the strings within …

Member Avatar for dononelson
0
196
Member Avatar for chinee

i have to create a soccer tournament like the world cup that starts off with 32 teams that goes down to 16 then quaters, semis and final i have to use sort stacks or queues or even linkedlist. there must also be arrays, classes. gui for bonus marks but i …

Member Avatar for chinee
0
2K
Member Avatar for TinyBelly

How to pass radio button's value to another frame i only know how to pass label and textfield value but not radiobutton. is there anyway to take the value from radiobutton to another frame? this is the code of mine how to pass label and textfield [CODE]public void actionPerformed(ActionEvent e){ …

Member Avatar for mKorbel
0
1K
Member Avatar for SilentHunter13

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at DatabaseTwo.manufacturerSearch(DatabaseTwo.java:81) at SearchManufacturerScreen.searchForManufacturer(SearchManufacturerScreen.java:241) at SearchManufacturerScreen.actionPerformed(SearchManufacturerScreen.java:192) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at …

Member Avatar for JamesCherrill
0
227

The End.