I am adding a JPanel in a JScrollPane in my project. All is working fine, but there is one problem about mouse scroll using the mouse-Wheel in JPanel. It’s speed is very slow on scrolling. How to make it faster? My code is : Answer You can set your scrolling speed with this line of code Here is details.
Tag: java
How to connect in java as SYS to Oracle?
I receive this error: How to fix? (I need to be SYS). Thanks. Answer try this :
Call and receive output from Python script in Java?
What’s the easiest way to execute a Python script from Java, and receive the output of that script? I’ve looked for different libraries like Jepp or Jython, but most appear out of date. Another problem with the libraries is that I need to be able to easily include a library with the source code (t…
Passing annotation properties to meta-annotations
Say I have an annotation with a property: and I want to create a compound annotation with several meta-annotations, including the one that takes a property Is there a way that I can pass properties to the compound annotation to one of the meta annotations? Eg, something like this: that is equivalent to, but m…
Heap allocation and suitable hardware
For a C# .net 3.5 application which unavoidably creates a lot of data on the heap, in terms of hardware what would I be looking for in terms of memory? Would it just be the largest socket bus width? Or the “bandwidth” of the memory sticks? Or the actual frequency they run at? We have concluded the…
LinkedList: java.lang.OutOfMemoryError: Java heap space
I’m trying to make a graph implementation for an assignment, which has Graph(GraphImp) objects and Node(NodeImp) objects. Node objects contain a reference to their Graph, x & y co-ordinates and a name. The Graph object contains a linked list of its Nodes. The problem occurs when I try to add a Node …
When a subclass is instantiated, is only one object created?
Since many constructors also call the superclass constructor, it seems like one could think that both the subclass and the superclass are instantiated when a subclass is instantiated; i.e. more than one object is created. Is still just one object created? Thank you Answer Just one object, even if the super…
Radio Button value retrieval using servlets
I’m quite new to the process of web development, so I apoligise if this seems a really silly question. Basically, I’m creating a servlet whereby a user will answer ‘yes’ or ‘no’ to three 3 questions, and then submit the form. What I wish to do is to retrieve the value of ea…
Android : How to read file in bytes?
I am trying to get file content in bytes in Android application. I have get the file in SD card now want to get the selected file in bytes. I googled but no such success. Please help Below is the code to get files with extension. Through this i get files and show in spinner. On file selection I want
JAVA_OPTS for increasing heap size
I want to increase my Heap size. How can I use JAVA_OPTS for doing so.I am getting the following error may be this is because of low heap size Answer You should be able to use the information found in this post. where zzz is your minimum size. where zzz is your maximum size. You can find more info on