awt Questions

2

Solved

I need to print a 1800 x 1200 pixels, 300 dpi image on 4" x 6" paper (also known as 4r) What I have Tried I have created a PrintRequestAttributeSet which takes care of my PrintableArea(4 x 6), Pr...
Railhead asked 3/12, 2014 at 13:50

3

Solved

Is it possible to do draw a rectangle with a given border thickness in an easy way?
Mccann asked 18/11, 2010 at 20:56

4

Solved

Is it possible to get the top card in Java's CardLayout? I've tried looping through each component to check for visibility with isVisible() but it seems that they're all "visible". Edit: By "top c...
Bisset asked 10/12, 2010 at 20:58

4

Solved

What is the difference between JPanel and JFrame and relationship to lightweight, heavyweight?
Indifferentism asked 7/12, 2012 at 18:42

1

Solved

I want to overwriting file that I have saved before, my saveAs code: public void saveAs(){ judul = jTextJudul.getText(); s = area.getText(); if(s.length()>0){//jika s terisi try { di...
Microspore asked 22/11, 2014 at 4:9

2

Solved

When rendering a chart with JFreeChart, I noticed a layout problem when the chart's category labels included Japanese characters. Although the text is rendered with the correct glyphs, the text was...
Chorion asked 26/9, 2014 at 16:8

5

In a subclass of a JPanel I am doing this: public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D)g; g2d.rotate(Math.toRadians(90.)); g2d.drawString(aS...
Unreasoning asked 28/1, 2013 at 19:18

3

Solved

I have noticed that people recommend not intermixing Swing and AWT Components, however we see this alot: import javax.swing.AbstractButton; import javax.swing.JButton; import javax.swing.JPanel; i...
Lavinalavine asked 20/8, 2012 at 15:1

4

Solved

I want to rotate text on a JPanel using Graphics2D.. My code is this: double paso=d.width/numeroBarras; double alto=datos[i].valor; Font fBarras=new Font("Serif", Font.PLAIN, 15); g2.setFont(f...
Marston asked 10/4, 2012 at 6:9

3

I'm going to write a new application which shall have a GUI. As I recently crossed a book about Scala (and became really choked-up) I decided to learn that language first and then try to build the ...
Lauraine asked 22/5, 2011 at 12:24

1

Solved

My question is that i need to make a GUI that keeps updating becuse i get values that can change from a DB and i got some problems in the graphical area. well im using Drawline and Drawstring from...
Mineralogist asked 21/10, 2014 at 1:23

2

Solved

Can anyone guide me how to code the arrow line in different direction. wa and wl is positive the rectangle will be on top of the x-axis. Below example shown if wl is negative and wa is positive. T...
Hernardo asked 6/11, 2010 at 10:18

3

Solved

Is there a way to an event listener to a JFrame object to detect when the user clicks the window maximize or minimize buttons? Am using the JFrame object as follows: JFrame frame = new JFrame("Fr...
Chaechaeronea asked 22/6, 2012 at 1:3

1

Solved

This Q&A was inspired by Unicode char not rendering in Swing, what font is used in real? but since it does not answer the specific question asked, I decided to enter it as its own Q&A. The ...
Empyreal asked 5/9, 2014 at 10:17

5

I'm using java logging to write log messages of my application to a log file and other destinations. Having set the log level to FINE, I also get (unwanted) messages from AWT/Swing, such as: {0}, ...
Jaworski asked 17/5, 2011 at 10:24

3

Solved

I need to use custom fonts (ttf) in my Java Swing application. How do I add them to my package and use them? Mean while, I just install them in windows and then I use them, but I don't wish that t...
Muriel asked 21/10, 2012 at 14:13

1

Running Xilinx Vivado FPGA design tool in Kubuntu 14.04 it uses antialiased fonts pnly in some parts of the UI making it even hard to use, not to say ugly looking. Others seem to have same issue. ...
Depth asked 30/6, 2014 at 18:31

1

I am attempting to rotate a GridLayout filled with text labels to simulate a portrait orientation view due to an OS restriction. The JPanel they are inside of is not square, so when rotating 90 deg...
Hortatory asked 11/8, 2014 at 20:47

1

Solved

There are 2 monitors attached to my computer and I want to count them programmatically. How to do that with Java?
Carmine asked 7/8, 2014 at 10:6

2

Solved

I have a group of radio buttons defined as 'ButtonGroup bg1;' using 'javax.swing.ButtonGroup' package. I would like to disable this group so that the user cannot change their selection after clicki...
Infiltrate asked 27/7, 2014 at 12:4

2

I'm currently trying to implement a 2D shadow casting method in Java by following this tutorial: http://ncase.me/sight-and-light/ I want to stick to Line2D and Polygon objects. Here is the main pa...
Papen asked 31/5, 2014 at 5:56

2

I've been trying to set fixed column width in the following code for ages...The thing is that when I add a label to the panel on the left, then the width is incremented automatically...and i Would ...
Emblem asked 16/7, 2014 at 12:11

2

Solved

I have been doing some reading on AWT vs Swing, but I am not really clear on how Swing works. I have read that Swing sits on top of AWT and that it is lightweight (as opposed to AWT). My question i...
Viviparous asked 8/7, 2014 at 2:54

4

Solved

How can I know the button that was pressed from within a mouseDragged event? I'm having an issue in mouseDragged() because the received MouseEvent returns 0 for getButton(). I have no problem with...
Karlee asked 3/7, 2013 at 6:21

1

Solved

I am trying to write a SWT component, that is able to take and draw an instance of java.awt.BufferedImage. My problem is that SWT's Image and AWT's BufferedImage are incompatible: SWT components ca...
Mulhouse asked 16/6, 2014 at 9:32

© 2022 - 2024 — McMap. All rights reserved.