Hey guys,
I have a Line2D object that I want to be able to move across the screen (a JPanel) when the user clicks and drags on it. I've trying doing stuff with the mouseDragged() mouse event but it's not working. Anyone know a way?
Your help is much appreciated.
User Profile
Collapse
-
Downloading an Image via HttpConnection (J2ME)?
How can it be done? Whenever I do it, it downloads a file that is the right size, but seems to be corrupt (ie. can't open it).
...Code:HttpConnection conn = (HttpConnection)Connector.open(url); InputStream fromServer = conn.openInputStream(); byte[] theBytes = new byte[(int)conn.getLength()]; int i; while ((i = fromServer.read(theBytes)) != -1) {}; fromServer.close(); conn.close(); -
The documentation doesn't contain anything about it. Anyone got an answer? -
I'm using ktoolbar to compile the app. How do I do it in there?...Leave a comment:
-
Error when building J2ME application
Hi all, I get the following error when building a J2ME app:
Something's obviously wrong with the Java version. I have Java 1.6.0_05 installed, though. I had an older version of Java installed previously, if that matters.
How do I fix this error?... -
But doesn't that defeat the purpose of modifying the row at line 20, if I'm just going to write SQL that does the same thing? What's the point of having Update() then?...Leave a comment:
-
DbDataAdapter.Update() not working?
I'm having some trouble updating retrieved data in a DataSet, in C#. Here's the code:
(I'm using the Firebird Client btw)
...Code:static void Main(string[] args) { DbProviderFactory f = DbProviderFactories.GetFactory("FirebirdSql.Data.FirebirdClient"); DbConnection conn = f.CreateConnection(); conn.ConnectionString = "user=admin;password=password;database=TEST.FDB;ServerType=1"; -
Simple: Changing scroller size on JScrollPane?
Hi guys. I have a mouse event on my frame that enlarges the size of a JPanel that in on a JScrollPane. When the JPanel's size changes, the JScrollPane's scrollbars don't "refresh" ie. their max values don't get bigger, so you can't scroll to see rest of the entire bigger JPanel anymore.
Any ideas? I'm not asking to change the physical size of the scrollbars, I want to change the max values (at least that's what I think you'd... -
Getting a file?
Hi, I'm making a program that gets a file and sends it via a socket. The file to get will be specified by a String that the user enters. Problem is, I have no idea how you retrieve files.
I've tried "File file = new File(input)" but that just creates a file (I think), doesn't actually retrieve an already existing one...
Also, how would you then send said file via TCP? I cant do writeBytes(file ) on the socket's outputstream,... -
Java server output problem.
Hi, I'm trying to read output from a server. In the client I have done:
...Code:Socket clientSocket = new Socket("127.0.0.1", 7777); DataOutputStream toServer = new DataOutputStream(clientSocket.getOutputStream()); toServer.writeBytes("Hello" + '\n'); BufferedReader fromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); String serverMessage = fromServer.readLine(); -
I have now installed the correct Java that I need. Still, does not work.
It still says the 'The HTTP listener is not running on 'computer' at port 8889', even though I have the OC4J instance started.
I did 'netstat' at the command prompt, and sure enough, nothing is running on port 8889.
Help please?Leave a comment:
-
Listener error
I get an error FRM-10142 when I proceed to run my form. All my runtime preferences are set correctly, and I am running the listener.
I do not have Java 1.4.2_05 installed... could that be the problem? And where can I find this version of Java if that is the case? -
How to restore the path variable to get OracleDevSuite working?
Hi guys, I've done something stupid. I accidently deleted some of the environment variables on my XP laptop. Now it has stuffed up my installation of OracleDevSuite.
So if possible, could you guys tell me what variables are required for it to run properly, so I can put them back in?
Thanks. -
-
Calling a function returns error C2662. Help?
Hi, I'm making a simple program in C++.
I have an object named TextReader, with a function GetString(), and I also have another object, TextWriter.
Now when *TextWriter is called, it needs to return a character. It will get this character from TextReader.GetS tring(). However, I get an error C2662 when I try to implement this.
Here is my dereference operator function for TextWriter:
...Code:char TextWriter::operator*()
-
I'm working in C++.
And I don't think strcat() is what I'm looking for. I just want to combine different things into one string.Leave a comment:
-
How to seperate values in a string?
NEWB QUESTION.
I don't mean split. I mean just have multiple values making up a string.
ie. string tmp = "blah" + variable1 + variable2 + "blahblah";
This obviously doesn't work. How can I make all of this into one string? -
Okay, I've now included Test1.h in the .cpp file. I still get the same errors outlined above.
I'm not sure exactly what the string library I'm using is. I just don't know how to have the string type in C++, so was using that. But obviously that doesn't work at all, as it's giving me errors...
Any suggestions? How would you get strings in C++?Leave a comment:
-
Problem with simple string function
Hi, I'm having a problem implementing a simple function Function1 that returns a string.
Test1.h:
Test1.cpp:Code:class Test1 { public: Test1(); string Function1(string msg); };
I get errors...Code:#include <iostream> #include <string> using namespace std; string Function1( string msg ) { ... }
No activity results to display
Show More
Leave a comment: