Skip to content
Advertisement

Tag: awt

Horizontal JScrollPane inside vertical JScrollPane

Good afternoon! It is necessary to make a list (vertical) from lists of events (horizontal). There are at least 2 problems: the area of the list of events (horizontal scrolling) expands beyond the borders of the panel. Apparently, the problem is with Layout, but I can not find the right combination; horizontal scrolling does not work (probably due to the

Center shape defined in Cartesian coordinates in JPanel

I have a shape (triangle for example) defined in Cartesian coordinates and I’d like to translate the shape to the center of a JPanel. I’ve been able to translate about the JPanel’s 0,0 orientation, but I can’t figure out how to center based on the JPanel’s width and height. I’d like to be able to center any shape defined by

Java awt draw elements around a circle

I’m currently writing a little game and I came over a problem. I need to draw 64 small circles at the border of a big circle. So I want something like this: I’ve already tried many things, but they didn’t worked. How can this be done in java, using the java.awt.Component#paint() method and the java.awt.Graphics class? Thanks. Answer So, your

change color of already drawn Graphics object in java AWT not working

Am trying to change color after drawing the object in window, this is what i came up with, am a beginner so this is messy. } The class Figure is an abstract class that is inheriting from java.awt.Frame Any remarks about how to make this code cleaner will be appreciated, thanks. Answer Before you begin on something as complex as

2d double array to image

I’m currently working on a simulation with continuous agents, which leave a pheromone trail on a 2d double array. The pheromone trails need to be on a 2d array because of a diffusion with a mean filter that needs to be performed. Ultimately, I need to visualise the agents and the pheromone trails, by transforming the double array directly into

Exception in thread “AWT-EventQueue-0” java.lang.RuntimeException: Uncompilable code – package org.netbeans.lib.awtextra does not exist [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 year ago. Improve this question

Advertisement