Graphic « Graphics « Java Swing Q&A





1. Swing: How to read graphic information underneath a component?    stackoverflow.com

How could I "read" graphic information underneath a component (let's say as BufferedImage)? I want to make that component half-translucent (already done) and apply graphic effects on underlying stuff, such as blur ...

2. Web Interface or Graphic UI    stackoverflow.com

Hey, i've a simple question. Task: Program a backup system which can be used by server-, or desktop-systems. The backup system should include a graphical configuration and status view. The programming language should be ...

3. Hold graphic screen    stackoverflow.com

In my program I have a class GraphDisplay extended from JPanel that is used to create graphics... In its constructor I have a function display() that creates all the stuff that ...

4. Changing Color of a Java graphic object    stackoverflow.com

I'm trying to flash a Java graphic object by changing the color and calling the repaint() method. The color is only updating with the final change color call. Here is my ...

5. how to repaint but still keep the graphic that painted previously?    coderanch.com

Hi, I am doing program to draw a graphic that composed by several lines. I want to draw it step by step, that means each time the button is clicked, I add one more line to the picture and keep the lines drawed previously. But each time when I draw, the lines drawed previously is erased, so I have to redraw ...

6. swing or awt for graphic display?    coderanch.com

i'm a java beginner and having problems. i need to display basic graphics (lines, rectangles, ellipses )alongside user changeable text fields. i can display the graphics using awt.geom but dont know how to display the text field alongside the shapes or at all for that matter - below is an attempt at coding this problem. i would really appreciate help pls...thanks ...

7. Swing graphic problem    coderanch.com

HI again. This code produces bad graphics too. import javax.swing.*; public class menuTest { static JFrame frame ; JMenuBar bar ; JMenu menu ; JMenuItem item ; public menuTest() { frame = new JFrame( "Testing the menu graphics...." ) ; frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ) ; frame.setSize( 400 , 400 ) ; bar = new JMenuBar() ; frame.setJMenuBar( bar ); menu = new ...

8. Java graphic problem in dual monitor machine, need help    coderanch.com

Hi all, I developed an application in Java swing. When I tested in my machine, everything was fine. However, when my clients started using it, most of them use at least dual-monitor pc wiht w2k system, they complained that, sometimes, there were glitch on graphic, as after they close the menu, part of menu graphic still stay there, though they can ...

9. Draw a graphic and call it later?    coderanch.com

Hello, im trying to draw several pages(graphics) but i would like to view it one at a time. Ill put a next and back button to browse it. Is it possible? The graphics will require me to query on a database and i don't want to query everytime i access the other pages. So is there a way that i can ...





10. Free graphic memory ?!    coderanch.com

11. Graphic question    coderanch.com

12. Canvas and Graphic classes    coderanch.com

13. Help Graphic is not displaying!    coderanch.com

I have a jcomponent for which I have overwritten the paintComponent() method. In this method, I am drawing images in a variety of places. This jcomponent is also an observer to another object that is deciding where images should be plotted. In my update() method, I have verified that I am catching the event that is saying a new image has ...

14. Graphic problem please help    coderanch.com

hi i have paint method and i'm able to get the correct result. but problem is when some other windows go over the graphic windows, the graphic will be lost and i need to repaint again. is there anyway to solve it? public void paint(Graphics g){ if(initial){ initial = false; g.setColor(Color.white); g.fillRect(0, 0, getWidth(), getHeight()); for(int x=0; x

15. Moving graphic in relation to another    coderanch.com

I am a soccer coach and want to develop a simple app which the players see how the team should move relative to the position of the ball. After reviewing several articles, my initial approach would be as follows: 1. Create a soccer field image and set as the background image of the frame or parent panel. 2. Create a class ...

16. Using PrinterJob to print graphic?    coderanch.com





17. array to graphic mapping    coderanch.com

import java.awt.*; import java.awt.event.*; import java.util.Random; import javax.swing.*; public class UpdateTest implements ActionListener { String[][] data; JLabel[][] labels; Random seed = new Random(); public void actionPerformed(ActionEvent e) { getData(); loadData(); } private void getData() { String s = "abcdefghijklmnopqrstuvwxyz"; String[] letters = s.split("(?<=[\\w])"); for(int j = 0; j < data.length; j++) { for(int k = 0; k < data[j].length; k++) { ...

18. how to decide which graphic technology to use    coderanch.com

There are various definitions of "thin" and "fat" - which is the one you're using, and why is that a requirement? Wherever Java runs, both AWT and Swing are available, so from that point of view, none is "fatter" than the other. As an aside, AWT doesn't support drag-and-drop, which leaves just Swing (if we disregard SWT for the moment, which ...

19. HFJ (Chp 12 A Very Graphic Story & Chp 13 Swing)    coderanch.com

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - ...

20. Why java apps take too much power of graphic card    coderanch.com

I have WindowsXP, some Radeon graphic card, whose fan is regulated by SmartDoctor utility - the bigger load (for example 3D games), the bigger cooling. I noticed, that all Java applications (Swing, but also others , for example JDeveloper) put a heavy load on my graphic card too. Is it normal ? Can the load be somewhat reduced ? Thanks.

21. graphic environment for testing    coderanch.com

22. custom control rendering with Graphic object    coderanch.com

Is there a way to render control like list box,combo box from groundup using graphic object and its methods ? All I get is, public void paint( Graphics g); Can you point me to any prior work which I can use. To give you more background info, It is for a mobile framework (Custom j2me, pretty old) where default control rendering ...

23. Swing Graphic interface    java-forums.org

This isn't very specific information. As i mentioned previously, you'll probably want to use MVC to put your application together. Also don't feel obligated to use a specific pattern. As you've found out when you tried to shoe horn your application into the visitor pattern which didn't work as expected. Why can't you modify your app to work with what you ...

24. Keeping a graphic central    java-forums.org

package testing; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import javax.swing.JComponent; public class SquareComponent extends JComponent { private static int width, height; private static double x, y, w, h; SquareComponent(int w, int h) { width = w; height = h; } public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle2D.Double square = new Rectangle2D.Double(); w = width * 0.2; h ...

25. Help with a Bank graphic simulation    java-forums.org

Hi everyone. I don't speek too much english, so I hope you understand me. I need help with this program. Basically it shows a bank environment with 3 counters? and a line. The thing is that I have to represent how people in the line go to the counters and after a random time they leave. the line is supposed to ...

26. how to add graphic diagrams to the arraylist    java-forums.org

My code is that am able to draw different diagrams on mouse drag to the panel but i cant see the diagram drawn if i draw another diagram . i.e i want all the diagrams to be displayed . if i had drawn rectangle and now if i press the button ellipse to draw a ellipse then the rectangle is vanishing ...

27. Java Free graphic library for swing?    forums.oracle.com

Hello, i am reading a Book titled Java 6 in 21 days as i heard it was a good book to start on. It says somewhere in the swing section that the java website has free example graphics you can use in your swing application, and they could come in real handy right now as i am designing the menu for ...