31,001 Topics

Member Avatar for
Member Avatar for cs_1000100

Hello, My question is if I have program programmed by matlab and I want program an interesting interface using another program language such as java ,can I do that? Please give me suggestions about programming wonderful interface using matlap or any other language can integrated with matlap because the original …

Member Avatar for cs_1000100
0
257
Member Avatar for miramiey

Hello, I am creating simple an applet to draw a registration form based on the selected item within the awt choice object. I have include a radio button, choice list and button. My problem is when running the Applet...the choice list is blinking and when I maximized or minimise frame …

Member Avatar for JamesCherrill
0
211
Member Avatar for Jnk

I have a problem with sockets. I am using this code in java as the client: [CODE] class Javaclient { private static DataInputStream input; private static PrintStream output; public static void main(String argv[]) throws Exception { int PortNumber = 4321; String line; BufferedReader in; Socket MyClient = null; try { …

Member Avatar for Jnk
0
249
Member Avatar for TIM_M_91

Hi guys well what I'm trying to do is produce a query that only produces the results which will match my director input. I have looked for the correct syntax and cannot seem to find it. Any help would be appreciated Code of my syntax below: [CODE] ResultSet results = …

Member Avatar for javaAddict
0
114
Member Avatar for Connavar3

Hi everyone! I have written a server client that receives information, does a database transaction and then sends the result back to the client. My client has requested that they be able to view what was received and what was sent in real time. I have used a JTextArea. The …

Member Avatar for Connavar3
0
409
Member Avatar for mrbaconbitts

I am building a program to make a pyramid as such. 1 1 2 1 1 2 4 2 1 Etc. For 8 rows. [CODE]public class PrintingNumbers { public static void main (String [] args) { int k = 1; for (int i = 1; i <= 8; i++) { …

Member Avatar for mrbaconbitts
0
126
Member Avatar for gatorgirl

My classes compile but for some reason, I always get false when I try to add a student to a course. could someone please help me? [CODE]public abstract class Student extends Person { protected Course[] courses; protected final int maxCourses = 4; protected int numCoursesEnrolled; protected double gpa; public Student(String …

Member Avatar for DJSAN10
0
137
Member Avatar for Torf

I'm wanting to convert this part of the pseudo-code... [quote] start string name string address num item num quantity num price num SIZE = 6 num VALID_ITEM [SIZE] = 106, 108, 307, 405, 457, 688 num VALID_ITEM_PRICE [SIZE] = 0.59, 0.99, 4.50, 15.99, 17.50, 39.00 num sub string foundIt = …

Member Avatar for Torf
0
157
Member Avatar for klatuu

I have [I]some[/I] experience with Java and Javascript and searching this forum has helped me tremendously, but haven't been able to find this exact problem explicitly. In a nutshell: I want to call a java class straight from javascript i.e. use a java class in javascript without OBJECT or APPLET. …

0
155
Member Avatar for Hattoff

Hey everyone, I am new to the site and to programming so please be gentle. I am working on a simple project where I use pre-created classes that define shapes and call the methods within them to create a picture on a canvas. I have most of this down, but …

Member Avatar for JamesCherrill
0
237
Member Avatar for adil_bashir

Ihave written the below pieces of code, but i am not able to solve the compilation error here as it shows the error as ArrayOutOfBoundsException error. so please tell me hw to remove the error and please bring the necessary changes. [CODE] import java.util.*; public class Cipher { private int …

Member Avatar for adil_bashir
0
159
Member Avatar for adil_bashir

i am doing the coding of my minor project and for that i need to convert an input text(String) to an int type as i am inputting the data through swing component, panel as text(string). But internally i need to process that as int. so please tell me how can …

Member Avatar for adil_bashir
0
180
Member Avatar for nidheeshkumar.r

hey, i cant set the size of a frame to a particular dimension.My code is :- [CODE]public class ImageShow extends JFrame{ ResultSet r; Image img; public ImageShow() throws SQLException { setTitle("Image retrieved"); JPanel panel = new JPanel(); //setSize(500, 500); setDefaultCloseOperation(HIDE_ON_CLOSE); Container pane = getContentPane(); panel.setLayout(new GridLayout(3,3)); r=ImageRetrieve.rs; while (r.next()) { …

0
79
Member Avatar for adil_bashir

[CODE] public static void main(String[] ar) { ..... int N = Integer.parseInt(args[0]); ..... } [/CODE] Error is : Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0

Member Avatar for adil_bashir
0
91
Member Avatar for MrHardRock

Hey everyone, I recently had the assignment to write a recursive program to calculate greatest common denominator. I barely understood recursion when our instructor explained it to us. I understood how it works and calling on itself I am just bad at implementing it. I think I almost got my …

Member Avatar for MrHardRock
0
289
Member Avatar for kalcio

hi, I want to make an application in java to visualize on graphic the network (the name and addresses of local servers of the company ... for example) using the tracert command, if any one can enlighten me that idea, because Internet is a wide world.

Member Avatar for kalcio
0
144
Member Avatar for mehnihma

can someone help me how how can catch CTRL C and print it out then stop the program? Thanks [CODE]/** * 218-102 Lab 7 * TestCircle.java * * @author JKang & JLeone * */ import java.util.*; import java.awt.event.*; import javax.swing.*; import java.awt.*; public class TestCircleB { public static void main(String …

Member Avatar for mehnihma
0
9K
Member Avatar for rushikesh jadha

how to backup mysql database using java and store backup file into my current directory of source code.

Member Avatar for peter_budo
0
114
Member Avatar for arathy nair

Hi All, I have PDFs that are to be watermarked. I need to know whether there exists the below options 1 Option is : Whether we can rewrite the same file with the logo instead of taking the existing pdf and writing this pdf into watermarked file option2 : Whether …

Member Avatar for peter_budo
0
296
Member Avatar for bhallarahul
Member Avatar for bhallarahul
0
102
Member Avatar for DJSAN10

I want to create a regular expression that matches with the string "B. Hello" or "C. Hello" and so on.. I tried number of things and finally came up with this [CODE]String REGEX = "[A-Za-z]"+Pattern.quote(".")+" Hello";[/CODE] but still no luck.. I tries using '\s' for space but still not working. …

Member Avatar for DJSAN10
0
176
Member Avatar for TIM_M_91

Hi guys well I have a problem on my JFrame which is once I click on my List all Videos button it displays my data from my MS database which all works well. However as you can see from the png the query results are not aligned up correctly together …

Member Avatar for DavidKroukamp
0
119
Member Avatar for rushikesh jadha

i have created program below ,but it does not run successfully why [CODE]import java.sql.*; public class Bank { public static void main(String[] args) throws Exception { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // TODO code application logic here try{ Connection cn=DriverManager.getConnection("jdbc:odbc:rushiDSN"); System.out.println("Connected Successfully"); Statement stmt=cn.createStatement(); stmt.executeUpdate("CREATE TABLE Author(AuID Number(3), AuName Char(15), AuAddr Char(30))"); System.out.println("Table created …

Member Avatar for rushikesh jadha
0
256
Member Avatar for moe0

Hello I'm writing a little program to check if a postal code is valid or not and I'm using while loop and if statement this is the code: [CODE]final String REGEX = "[A-Z&&[^DFIOQU]][0-9][A-Z&&[^DFIOQU]] [0-9][A-Z&&[^DFIOQU]][0-9]"; output.println ("Please Enter a Valid Postal Code: "); String postal1; String postal2; boolean isCorrect = false; …

Member Avatar for DavidKroukamp
0
73
Member Avatar for gatorgirl

So, I have multiple classes modeling a university. I have Student which has subclasses GradStudent and UndergradStudent. I also have a course class. I am having issues figuring out what to pass to add and drop students and to add and remove courses. I keep getting errors like this: ./Student.java:39: …

Member Avatar for stultuske
0
3K
Member Avatar for Valiantangel

hi Got 2 questions. 1.How can i simplify 4 variables all with same condition? if a,b,c,d <1 System.out.println("Invalid input");? How to put this in a simple code?I know it can be done individually. 2.if the above condition is false i dont want my code to go further and calculate the …

Member Avatar for DJSAN10
0
85
Member Avatar for jkembo

I would like to move the mouse cursor from one position to another within a Jtextfield after a condition is satisfied. I do not know what to use. Thank you

Member Avatar for jkembo
0
622
Member Avatar for MicroD

Hello guys. I'm wondering is it possible to stream mp3 songs from some site with java? I tried to find something but allways everything what i found was only for reading mp3 songs from local disk. If you know feel free to answer me. - Regards, David.

Member Avatar for RicardoE
0
1K
Member Avatar for dsmith12

My professor told me these things are wrong:1) For getting the "#" sign in your board, you need to call the createTicTacToeBoard() method to create the board. The returning type of the method is char[][] createTicTacToeBoard() not the string, and you don't need to pass any array into this method …

Member Avatar for DavidKroukamp
0
151
Member Avatar for adil_bashir

please check the following piece of code and give the correct code as my program is showing some error. here is the code. public class passingArray { public int getCipherText(int[] c, int len) { int cipher = 0; int e = 7; int n = 130; cipher = (int)((Math.pow(c[len],e)) % …

Member Avatar for DavidKroukamp
0
234

The End.