Questions tagged [awt]

The Abstract Window Toolkit (AWT) is Java's original platform-independent windowing, graphics, and user-interface widget toolkit.

The AWT is now part of the Java Foundation Classes (JFC) — the standard API for providing a graphical user interface (GUI) for a Java program.

AWT is also the GUI toolkit for a number of Java ME profiles. For example, Connected Device Configuration profiles require Java runtimes on mobile telephones to support AWT.

http://en.wikipedia.org/wiki/Abstract_Window_Toolkit

6550 questions
2
votes
2 answers

How adjust image in java that open by default taking the computer resolution automatically

A image is read and is displayed as splash before the actual things come out. Now problem is that i want to fix the resolution of image accroding to the computer in which it get executed. How this can be done? Code is as below import…
Rajeev Kumar
  • 435
  • 2
  • 7
  • 20
2
votes
1 answer

KeyEvent not firing when certain other keys are pressed

I'm having more key problems in Java. The SPACE Key event works just fine by itself, and when other keys are being pressed... But if I press down the UP key and the LEFT key at the same time the SPACE event does not fire. However the SPACE does fire…
Joe
  • 100
  • 7
2
votes
1 answer

JAVA AWT how can I close dialog by pressing a button

I have an AWT modal dialog public class d extends java.awt.Dialog {... On the dialog frame, using netbeans gui designer I put dialog then panel then button. I am trying to close the dialog by pressing the button. I am not interested in…
norbi771
  • 814
  • 2
  • 12
  • 29
2
votes
1 answer

Get KeyChar from key text

I have to work with a string standing for a keystroke (for instance "A", "ENTER", "F4"). From this string I need to get the keychar, the keycode and the key modifiers for the keystroke. Here is what I do (for F4 for example) : AWTKeyStroke ks =…
LuSyo
  • 35
  • 1
  • 3
2
votes
5 answers

Handling \n in LineBreakMeasurer

There are thousand articles how to use LineBreakMeasurer to draw multi-line text but there is none about drawing multi-line text taking into account also \n(when you want to force a new line at a specific position in text and not only when the right…
adrian.tarau
  • 3,124
  • 2
  • 26
  • 29
2
votes
0 answers

Where is awt.properties, and how do I provide localized versions of it in a Java Plugin

In a Java Plugin, I'm displaying KeyEvent.getKeyText(VK_CTRL) in an Action, but I want it to be shown in different Languages, depending on the Locale of the user. For example, in English, it's CTRL, but in German it is Strg. In reading the…
stuckless
  • 6,515
  • 2
  • 19
  • 27
2
votes
2 answers

java image convolution

I am trying to apply smoothing filter to image . But I get this bug : java.awt.image.ImagingOpException: Unable to convolve src image at java.awt.image.ConvolveOp.filter(ConvolveOp.java:180) at ocr.Resolution.smoothing(Resolution.java:102) at…
Ecrin
  • 246
  • 5
  • 21
2
votes
3 answers

Which is a better top level container for this design, JFrame with Jpanels, or JDesktop with JInternalFrames

I'm a beginner with Swing and AWT, I'm looking to build a GUI using Netbeans. My GUI requires three areas, that I'm currently thinking of as JPanels on a JFrame. I require a "Drawing" panel that will listen for mouse input and draw Java2D shapes. …
NickAbbey
  • 1,201
  • 2
  • 10
  • 17
2
votes
1 answer

Applet Components Not VIsible

I am Calling an Applet Class After Login. The form is Visible but the Components are Not Visible what COuld be the Issue; Here is My Class: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package…
Stanley Mungai
  • 4,044
  • 30
  • 100
  • 168
2
votes
1 answer

Scrolling through JPanel clears its graphics

I am a beginner with Java Programming and I have a problem. I am using a JPanel in a JScrollPane all contained in a JFrame. I am using paintComponent() method to draw a certain curve and that's done correctly. The problem is that when I scroll…
2
votes
2 answers

JApplet behaving unexpectedly

import java.awt.Graphics; import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JApplet; import javax.swing.Timer; public class CountingSheep extends JApplet { private Image…
JohnW
  • 345
  • 1
  • 7
  • 15
2
votes
1 answer

Alternative to java.awt.imageproducer for android

I am trying to implement some ocr using a guide from on stackoverflow. the example code for the use of the application is using java and i am trying to run it on android. Here is the code from the example; // OCRScannerDemo.java // Copyright (c)…
Biscuit128
  • 5,218
  • 22
  • 89
  • 149
2
votes
3 answers

How to throw an Exception if calling AWT code outside EDT thread?

I've searched this along the way on the net but i haven't found an answer yet.. maybe someone of you guy knows this. I'm developing a swing desktop like application; since I know that swing is not thread-safe (and if I call a method on a JComponent…
mimmoz81
  • 41
  • 5
2
votes
2 answers

Nested JPanels and GridBagLayout Not "Packing" Components

I've attached a screenshot for which the following Border legend applies: Yellow = JPanel with BorderLayout Blue = JPanel with GridBagLayout Fuchsia = JPanel with FlowLayout There are two panels not blocked out in colors that warrant mentioning: 1) …
Rich Hoffman
  • 742
  • 1
  • 7
  • 23
2
votes
2 answers

Issues with GridLayout not working

I am trying to create a 2x2 grid out of 4 buttons for a membership program I am developing. The issue I'm having is that regardless of what I do, it just shows up as a 1x4 grid. Code is as follows. private void buildStartupPanel() { startup…
Matt Westlake
  • 3,499
  • 7
  • 39
  • 80
1 2 3
99
100