Member Avatar

I'm trying to give access to client computer from my server and also tryin to revoke the granted access... the grant is successful but the revoking is not working please help. hms is the satabase that i want to give access to my clients.. my code try { Connection con = getDBConnection(); Statement stmt = con.createStatement(); if (sts == true) { String query = "GRANT INSERT,SELECT,UPDATE,DELETE ON hms.* TO '" + MainFrame.dbUser + "'@'" + ip + "' IDENTIFIED BY '" + MainFrame.dbPassword + "'"; stmt.execute(query); System.out.println(query); JOptionPane.showMessageDialog(null, "Permission granted to '" + ip + "' !"); } else{ String …

Member Avatar
+0 forum 3
Member Avatar

I've client and server on my wireless LAN , I can easily ping from client to server any time n, similarly i can ping from server to client for one time and after the application is run. I cannot ping again to the client from server. Why this is happening please help

Member Avatar
+0 forum 4
Member Avatar

Why the method of the following class is getting invoked several times even if the condition is false.Please help me with my code... public class PRDDayBook { int remX; public PRDDayBook(int x) { remX = x; PrinterJob pj = PrinterJob.getPrinterJob(); PageFormat pf = pj.defaultPage(); Paper paper = new Paper(); double margin = 9; paper.setImageableArea(margin, margin, paper.getWidth() - margin * 2, paper.getHeight() - margin * 2); pf.setPaper(paper); pj.setPrintable(new MyPrintable(), pf); if (pj.printDialog()) { try { pj.print(); } catch (PrinterException e) { System.out.println(e); } } } class MyPrintable implements Printable { public int print(Graphics g, PageFormat pf, int pageIndex) { if (pageIndex …

Member Avatar
+0 forum 10
Member Avatar

Hello guys i trying to manage the size of two jpanel according to the size of Main Jframe. I using netbeans drag and drop Jpanel1 is big and another one is small. wat i need to do is to change those panels size when main frame is resized> how can i do plz help. I tried borderLayout() but when i do this , my second panel is invisble. the whole panel is occupied by only fisrt panel. How can i do it in netbeans plz help

Member Avatar
+0 forum 3
Member Avatar

How can i change my java program in netbeans(currently) so that i can install my program in any other computer? Which is the currently best tool plzz help

Member Avatar
+0 forum 5
Member Avatar

I want to store a Vector<Vector<Object>> in mysql database. What is the best data Tpye that i can use in mysql and java to store and retrieve the datas.

Member Avatar
+0 forum 2
Member Avatar

In my desktop application whenever execute the code to backup my database from java application the app goes on waiting state may be for password , which we have to enter while backing up from command line. But i've provided the username and password of database in the code. Why is it going on waiting state. please help how can i do this. My execution code is: public boolean backupDB(String dbName, String dbUserName, String dbPassword) { Process runtimeProcess; try { runtimeProcess = Runtime.getRuntime().exec("C://xampp//mysql//bin//mysqldump -u"+ dbUserName+" -p "+dbPassword+" dbName+" > D://backup.sql"); int processComplete = runtimeProcess.waitFor(); if (processComplete == 0) { System.out.println("Backup …

Member Avatar
+0 forum 1
Member Avatar

I'm using Xampp for the database in my computer now what i want to do is to back up the database name "HMS" with "root" username and " " password. How can i do this in java please suggest.

Member Avatar
+0 forum 1
Member Avatar

HOw can i convert the String "2012-07-30" to Date object with same format 2012-07-30 which is date not a string. I've tried but i get the result in string. plz help

Member Avatar
+0 forum 2
Member Avatar

I've a bill which looks like ![untitled31](/attachments/large/2/untitled31.JPG "untitled31") this is the paper which i use in printer and i want to print the appropriate value in the correct position of that paper. As in the place of date i want to print date and in the place of Rate, Amount i want to print their respective values. How can i do this in java please help!!

Member Avatar
+0 forum 3
Member Avatar

I'm trying to print the necessary values in the predefined document for an example, in a Bill name in the left side and date on top right. I already had that documents with empty name and dates . how can i print the name and date to corresponding location in bill from my program. Please suggest.

Member Avatar
+0 forum 8
Member Avatar

HOw can i assign a default action of Enter key after cell of jtable is edited to a Button???

Member Avatar
-1 forum 2
Member Avatar

I am trying to update database by editing cell values in jtable. my table looks like ![a](/attachments/large/2/a.JPG "a") When i edit the value in particular cell and without clicking anywhere if i click on Update button the database is not updated as like this ! ![b1](/attachments/large/2/b1.JPG "b1") but if i click somewhere in the updating row, which again turns the look of table as fig. 1 then the database is upodated with particular value, why is this happening please help. My code for refresh Button goes like this: int pos = recordTable.getSelectedRow(); int id = (Integer) recordTable.getModel().getValueAt(pos, 0); ListSelectionModel selectionModel …

Member Avatar
+0 forum 5
Member Avatar

I'm trying to make a search by different option say A, B . what i need is if user provide value of A only then it does the searching using parameter A only , if user provide A and B then it needs to do searching using condition A=value1 AND B=value2. How can i do this please help how can i start?

Member Avatar
+0 forum 4
Member Avatar

there are two panel in one panel there is search button and in the another one there is Jtable for displaying search result. In that jtable initially all the records are displayed. But when i try to search, it works but the problem is that i need to click search button two times for searching 1st time and from second time onwards it works normally means even with single click results are displayed properly. what mistake am i making ? please suggest.

Member Avatar
+0 forum 5
Member Avatar

I want to update the contents of Jtable as shown below when the Jcombobox's item state is chaged in the left panel. but i am not being successful in it .Please help. ![untitled29](/attachments/large/2/untitled29.JPG "untitled29") when the table no value is changed in the left panel , i want corresponding Jtable values updated/refreshed as per the table number. how can i do this. please help.

Member Avatar
+0 forum 8
Member Avatar

I need to update the items of JCombobox from the database during runtime. I had made the JCombobox editable and what i need to do is type something in the editable combobox and search the database and only display the items matching the text. For example there are if i type "ap" in the editbox of JCombobox then i want only the items containing "ap" like "apes" and "apple" i can have them in the console during runtime but when i try to set those item as an items of Jcombobox i am getting error something including "MUtation....". how can …

Member Avatar
+0 forum 17
Member Avatar

how can i detect color using OpenCV i've tried thiscode Code blocks are created by indenting at least 4 spaces ... and can span multiple lines import static com.googlecode.javacv.cpp.opencv_core.*; import static com.googlecode.javacv.cpp.opencv_highgui.*; import static com.googlecode.javacv.cpp.opencv_imgproc.*; //non-static imports import com.googlecode.javacv.cpp.opencv_core.CvScalar; import com.googlecode.javacv.cpp.opencv_core.IplImage; public class ColorDetect { //color range of red like color static CvScalar min = cvScalar(0, 0, 130, 0); static CvScalar max= cvScalar(140, 110, 255, 0); public static void main(String[] args) { //read image IplImage orgImg = cvLoadImage("C:\\image.jpg"); //create binary image of original size IplImage imgThreshold = cvCreateImage(cvGetSize(orgImg), 8, 1); //apply thresholding cvInRangeS(orgImg, min, max, imgThreshold); //smooth filter- median cvSmooth(imgThreshold, …

+0 forum 0
Member Avatar

can any one give me the basic idea how can i start using openCV in java

Member Avatar
+0 forum 1
Member Avatar

HOw can i private chat with logged in users from a group chat? HOw can i begin the proces?

Member Avatar
+0 forum 2
Member Avatar

I have a server in python and client in java and i want to share images through the socket how can i do so? help plz

Member Avatar
+0 forum 3
Member Avatar

My server is in python and I'm trying to read and write to socket using ObjectInput/Output Streams whenever i write to socket there is some characters written in socket before my writeObject() command is executed and whenever i tried to read the data from socket using readObject() , it gives [B]java.io.StreamCorruptedException: invalid stream header: 756C3A3A [/B] error. What is the problem? i've shown the screen shots of the added characters.

Member Avatar
+0 forum 3
Member Avatar

HOw can i send and receive images over the socket in java?

Member Avatar
+0 forum 23
Member Avatar

Hello, i want to send images over socket .I had two methods one for converting the images to byteArray "convertImageToByteArray()" and another for converting byteArray to image "convertByteArrayToImage(byte[ ] b)" and i am trying to send bytes through socket and receving it , how can i do so please help.....

Member Avatar
+0 forum 1
Member Avatar

i have a username and password login box when i send data to the socket its fine but when i print the same data from socket then extra bit is added a head of username. why is it so...please suggest

Member Avatar
+0 forum 15
Member Avatar

How can i update my Jpanel with the labels from another class in certain intervals?

Member Avatar
+0 forum 14
Member Avatar

how can i add components to Jpanel from another class

Member Avatar
+0 forum 3
Member Avatar

i got a problem whenever i give the username of less than 4 character in java GUI then tha userlist from python server is regularly updating my UserList textField in JAVA GUI but when the character exceeds more than 3 that UserList textField is not updated rather the user list is being received at the socket from the python server. I can't recognise this is client's problem(in java) or server's problem(python) What can i do?

Member Avatar
+0 forum 1
Member Avatar

HOw can i read from a socket and display message from socket in Textarea of Chatpanel even if there is no any focus in Chatpanel.I mean when i create two chatpanel instance then after clicking the send button in 1st chatpanel the message from socket should be displayed in Textarea of second chatpanel without performing any action in second chatpanel.

Member Avatar
+0 forum 24
Member Avatar

I want to write some text to JtextArea of class1 from class2 . How can i do that? Thanx in advance for any suggestion

Member Avatar
+0 forum 3

The End.