|
rotor posted:You won't be able to write to it, IIRC. http://forum.java.sun.com/thread.jspa?threadID=300557&start=45&tstart=-1 Someone developed a cute hack I use to modify the classpath at runtime for plugin reasons.
|
# ¿ Mar 4, 2008 08:49 |
|
|
# ¿ May 4, 2024 12:42 |
|
Sweet and simple question about writing your own GUI controls. I have a custom control that prints "Help me COC " by extending JPanel and overwriting code:
When I directly write to g2 the zoomed text looks great. I used this code: code:
code:
Now zooming does not work anymore. I suspect it's because I write to an image in the second case and it's pixels are fixed once written. Any suggestions? Why are there differences between the Graphics context I get passed as the argument to the function and the one I create myself. What are these differences? Where should I draw to offscreen? How do I get a Graphics context that's equal to the one from the argument but doesn't directly write to the screen? Why is the zoomed text fine if directly written to the screen? Just what the hell is going on here, I appreciate any speculation.
|
# ¿ Mar 4, 2008 20:09 |
|
OK, I'm pretty sure this is what happens. 1. I write my stuff in my BufferedImage 2. I drawImage my BufferedImage to the Graphics context from the argument 3. The zoom kicks in and uses a method like Graphics2D::scale on the context 4. My drawn image pixelates because the scale method only sees the image and not the operations that created the image
|
# ¿ Mar 4, 2008 20:32 |
|
Is there an easy way to put breakpoints on Java library functions? Let's say I want to put a breakpoint on one of the constructors of java.io.File. IDE is Eclipse but I'm willing to switch to any IDE for this.
|
# ¿ May 8, 2008 19:41 |
|
TRex EaterofCars posted:Yeah, in Eclipse your java source should already be linked to the rt.jar file. Just ctrl+click on a new File() statement and it'll take you right to the constructor. If that doesn't work, you probably have to link the source. I can tell you how to do that if you need. Thanks for the reply but apparently this is tricky because when I set a breakpoint into the rt.jar source ...
|
# ¿ May 8, 2008 20:54 |
|
TRex EaterofCars posted:What versions of Eclipse and Java are you running? I figured it out. I was using the rt.jar from the real JRE, using the rt.jar from the JRE shipped with the JDK worked. Thank you.
|
# ¿ May 8, 2008 21:23 |
|
Eclipse configuration question: I have thiscode:
Also: I want these comments to be visible directly in the source, not the Javadoc tab.
|
# ¿ Jun 26, 2008 16:04 |
|
csammis posted:Also why are you using @Override on an interface method? Pretty much what the others said. My Eclipse adds it automatically and it's cool because unintended interface changes often turn into compilation errors. Also: Too bad that what I want does apparently not exist in Eclipse.
|
# ¿ Jun 27, 2008 19:34 |
|
I have like 50-75 classes that need to have the same 9 lines:code:
Is there any way that I can auto-generate these lines of code. I'd really like to do: code:
I'm using Eclipse. apt looks like it might work. Anybody ever done anything like that?
|
# ¿ Jun 30, 2008 17:56 |
|
poopiehead posted:This probably isn't the case, but if the classes can reasonably have a common base class or maybe can be grouped into a few common base classes, it's pretty easy. But unless they genuinely have something else in common, this would probably be a bad idea. Thank you for your reply, but you're obviously right. That's a really bad idea because it's not really a problem to be solved with inheritance (especially in a language with only single-inheritance support). Java.
|
# ¿ Jul 7, 2008 07:44 |
|
a_passerby posted:What's the easiest way to register a Windows file association from a Java program? For example, if I want my program to open all files with a .crap extension automatically, how do I register that with Windows?
|
# ¿ Aug 14, 2008 15:52 |
|
|
# ¿ May 4, 2024 12:42 |
|
Boz0r posted:is there any way around making for loops to insert them? There is System.arraycopy.
|
# ¿ Sep 22, 2008 17:55 |