awt

“java.lang.UnsatisfiedLinkError: no awt in java.library.path” in running JWS Swing app

一曲冷凌霜 提交于 2021-02-08 17:24:56
问题 We are sometimes getting this strange error from clients (automatically, no user report was filled until now), and none of us can make sense of it. A user starts our Swing Java-Web-Start "fat client" on a Win7 machine, eventually use some action that should produce a PDF document (using an ancient, modified Apache FOP version), and end up getting this error. So far, it's not reproducible on our side. Google did not help on this one either. The big question is, how can awt dll be missing, when

201874040116-李鑫《面向对象程序设计(java)》第8周学习总结

試著忘記壹切 提交于 2021-02-08 03:28:25
项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/nwnu-daizh/p/11703678.html 作业学习目标 掌握接口定义方法; 掌握实现接口类的定义要求; 掌握实现了接口类的使用要求; 理解程序回调设计模式; 掌握Comparator接口用法; 掌握对象浅层拷贝与深层拷贝方法; 掌握Lambda表达式语法; 了解内部类的用途及语法要求。 第一部分:总结第六章理论知识   1.接口(interface):        接口的声明语法格式如下:     [ 可见度 ] interface 接口名称 [ extends 其他的接口名 ] {      // 声明变量       // 抽象方法     }     1)接口不是类,是对类的一组需求描述,由常量和抽象方法组成,不能包含实例域和静态方法     2)不能构造接口的对象,但可以声明接口的变量,接口变量必须引用实现了接口的类对象     3)接口可以象类的继承一样扩展 public interface 接口1 extends接口2 {...}     4)一个类可以实现多个接口   2.回调(callback):     指出某个特定事件发生时应该采取的动作;在java

201874040116-李鑫《面向对象程序设计(java)》第十二周学习总结

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 02:55:42
内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/nwnu-daizh/p/11867214.html 作业学习目标 (1) 掌握Vetor、Stack、Hashtable三个类的用途及常用API; (2) 掌握ArrayList、LinkList两个类的用途及常用API; (3) 了解java集合框架体系组成; (4) 掌握Java GUI中框架创建及属性设置中常用类的API; (5) 了解Java GUI中2D图形绘制常用类的API; 第一部分:总结第九章、第十章理论知识   第九章:      1.java集合框架       1)Java 集合框架主要包括两种类型的容器,一种是集合(Collection),存储一个元素集合,另一种是图(Map),存储键/值对映射。Collection 接口又有 3 种子类型,List、Set 和 Queue,再下面是一些抽象类,最后是具体实现类,常用的有 ArrayList、LinkedList、HashSet、LinkedHashSet、HashMap、LinkedHashMap 等等。       2)集合框架是一个用来代表和操纵集合的统一架构。所有的集合框架都包含如下内容: 接口: 是代表集合的抽象数据类型。例如

Why does GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts() give different results when ssh'ed in?

≯℡__Kan透↙ 提交于 2021-02-07 14:16:19
问题 Why does the following program return different results depending on how I'm logged in? I'm compiling and running this program using Java 7 update 60 on a freshly installed Mac OS X Mavericks system. If I compile and run this in a shell when logged into the system normally I get less fonts than when I ssh into the system and run it. The program is as follows: import java.awt.Font; import java.awt.GraphicsEnvironment; public class FontList { public static void main(String[] args) { final Font[

using java.awt classes in android

六眼飞鱼酱① 提交于 2021-02-05 11:09:07
问题 i'm currently trying to use the library LLaTeXMath in an android app. The problem is, many functions want Arguments or have return values from the java.awt Package. So far, I've encountered Color , Insets , Image . For example the Method TeXFormula.createBufferedImage() requires 2 Color instances and returns an Image . How can i provide the arguments and use the return value? 回答1: It's not possible. The only class from awt you can use in android is java.awt.font 回答2: ok forget it, i found out

Java custom drawing with paintComponent() and paint()

☆樱花仙子☆ 提交于 2021-02-05 10:39:53
问题 I come from an Objective-C background and I have been developing on the iOS and Mac OS platform for a number of years now. I love the concept of custom drawing and therefore I would like to replicate what had been done by me on the aforementioned platform. In iOS I would call -drawRect() to draw a custom view and then, I could go ahead and add other visual components on top of that drawing. I know that there are equivalents in java swing and awt called paint() and paintComponent() . However,

Java custom drawing with paintComponent() and paint()

非 Y 不嫁゛ 提交于 2021-02-05 10:39:08
问题 I come from an Objective-C background and I have been developing on the iOS and Mac OS platform for a number of years now. I love the concept of custom drawing and therefore I would like to replicate what had been done by me on the aforementioned platform. In iOS I would call -drawRect() to draw a custom view and then, I could go ahead and add other visual components on top of that drawing. I know that there are equivalents in java swing and awt called paint() and paintComponent() . However,

Robot class java , typing a string issue

ⅰ亾dé卋堺 提交于 2021-02-05 06:11:46
问题 I m using the following loop , but its only typing the first charecter and the rest as numbers, any idea ? import java.awt.*; import javax.swing.KeyStroke; public class test { public static void main(String[] args) throws AWTException { Robot r = new Robot(); String s = "Face"; for (int i = 0; i < s.length(); i++) { char res = s.charAt(i); r.keyPress(res); r.keyRelease(res); r.delay(1000); } } } OUTPUT typing : F135 回答1: The keyPress/Release methods need an int value that represents the

repaint() method not calling paintComponent

放肆的年华 提交于 2021-02-04 08:40:52
问题 I'm trying to write a program that visualizes simple sorting algorithms using Java Swing. I have a menu with buttons that let the user choose which sorting algorithm they would like to see. My problem is that repaint() is not calling paintComponent after every index swap, so we don't get to see the array being sorted. Instead, the program just displays the array once the panel is made visible, showing the already sorted array. I've tried adding frame.revalidate() but it doesn't do anything

Java 五子棋小游戏

旧城冷巷雨未停 提交于 2021-02-03 01:09:31
package Day8_06; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JPanel; /** * * @author sky * */ public class Game { /** * 控件属性 */ private JFrame frame; // 五子棋游戏的窗口框架 private GameMap map; //