1 public class SwingTest123 extends JFrame implements ActionListener { 2 3 JRadioButton boy, girl; 4 JLabel mess; 5 ButtonGroup group; 6...
分类:
其他好文 时间:
2014-08-26 21:25:56
阅读次数:
253
1 class Person1 implements Comparable { 2 private Float height; 3 private String name; 4 5 Person1(float height) 6 { 7 t...
分类:
其他好文 时间:
2014-08-26 21:12:06
阅读次数:
185
Parent interface of Collection: Iterable InterfaceA class that implements theIterablecan be used with the new for-loop.TheIterableinterface has only o...
分类:
编程语言 时间:
2014-08-26 19:33:06
阅读次数:
272
更换皮肤1.更换皮肤其实就是更换Activity的背景图片直接上代码:Activity: 1 public class MainActivity extends Activity implements OnClickListener { 2 3 private SkinManager sk...
分类:
移动开发 时间:
2014-08-26 13:07:06
阅读次数:
232
public class SpActivity extends Activity implements OnClickListener { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstance.....
分类:
其他好文 时间:
2014-08-26 09:38:15
阅读次数:
222
Multiple markers at this line - implements java.awt.event.ActionListener.actionPerformed - The method actionPerformed(ActionEvent) of type DimmingGlassPane.Animator must override a? superclass met...
分类:
其他好文 时间:
2014-08-25 17:22:04
阅读次数:
299
工厂模式分为简单工厂模式和复杂工厂模式,前者是使用一个类来生成实例,通常是一个单体,后者是使用子类来决定一个成员变量是哪个类的具体实例,也就是简单工厂包含在复杂工厂之中。//implements AjaxHandler,创建一个复杂的工厂来执行Ajax的一系列流程,里面包含了两个简单工厂var Si...
分类:
其他好文 时间:
2014-08-25 13:10:54
阅读次数:
206
T.getClass()或者T.class都是非法的,因为T是泛型变量。由于一个类的类型是什么是在编译期处理的,故不能在运行时直接在Base里得到T的实际类型。/***可以在service层直接调用,也可以在DAO层扩展调用*/public class BaseDaoImpl implements ...
分类:
其他好文 时间:
2014-08-25 11:32:34
阅读次数:
134
除了使用构造器来获取类的一个实例,还可以使用静态工厂方法(static factory method)。下面的方法是将boolean基本类型转成一个Boolean对象引用: 1 public final class Boolean implements java.io.Serializable, 2...
分类:
其他好文 时间:
2014-08-25 01:04:23
阅读次数:
242
WangYiActivity.java:public class WangYiActivity extends Activity implements OnClickListener{public void onCreate(Bundle savedInstanceState) {super.onC...
分类:
移动开发 时间:
2014-08-23 18:56:21
阅读次数:
159