上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 43 下一页
摘要: IO 两大主流 16位和8位16位对应writer和reader fileWriter /fileReader 对文件进行读写 示例代码: FileWriter out=new FileWriter("test.txt");out.write("张三");out.close();char[] buf=new char[1024];FileReader in=new FileReader("test.txt");int len=in.read(buf);System.out.println(new String(buf,0,len)); 阅读全文
posted @ 2012-09-08 17:10 retacn_yue 阅读(157) 评论(0) 推荐(0) 编辑
摘要: /*** 边界面局管理** @time 2:59:38 PM* @author retacn yue* @Email zhenhuayue@sina.com*/public class Test_borderLayoutDemo extends Frame {private static final long serialVersionUID = 1L;private Test_borderLayoutDemo() {this.setLayout(new BorderLayout());this.add(new Button(""), BorderLayout.SOUTH) 阅读全文
posted @ 2012-09-08 16:35 retacn_yue 阅读(145) 评论(0) 推荐(0) 编辑
摘要: /*** 选项卡 JApplet是japplet的扩展** @time 9:09:33 AM* @author retacn yue* @Email zhenhuayue@sina.com*/public class Test_JtabedPaneTest extends JApplet {private static final long serialVersionUID = 1L;// 选项组件private JTabbedPane tp = new JTabbedPane(SwingConstants.BOTTOM);// 下接列表组件private JComboBox combo = 阅读全文
posted @ 2012-09-08 16:33 retacn_yue 阅读(198) 评论(0) 推荐(0) 编辑
摘要: /*** 列表* @time 4:53:26 PM* @author retacn yue* @Email zhenhuayue@sina.com*/public class Test_ListComboExample extends JPanel {private static JFrame frame;private static final long serialVersionUID = 1L;/*** 构造器*/private Test_ListComboExample() {setLayout(new GridLayout(2, 2));JList list = new JList. 阅读全文
posted @ 2012-09-08 16:32 retacn_yue 阅读(150) 评论(0) 推荐(0) 编辑
摘要: /*** 原始音频的播放和录制** audio** audioTrack*** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("static-access")public class AltAudioRecorderActivity extends Activity implements OnCompletionListener, OnClickListener {private Button btn_stop_play, btn_start_play, 阅读全文
posted @ 2012-09-08 16:14 retacn_yue 阅读(205) 评论(0) 推荐(0) 编辑
摘要: /*** 自定义捕获音频** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("unused")public class CustomRecorderActivity extends Activity implements OnCompletionListener, OnClickListener {private Button btn_finish, btn_play, btn_start_record, btn_stop_record;private 阅读全文
posted @ 2012-09-08 16:13 retacn_yue 阅读(289) 评论(0) 推荐(0) 编辑
摘要: /**** 使用意图捕获音频** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/public class MediaRecorderDemoActivity extends Activity implements OnCompletionListener, OnClickListener {private static final int RECORD_REQUEST = 0;private Button btn_play, btn_record;private Uri audioFileUri;@Overr 阅读全文
posted @ 2012-09-08 16:12 retacn_yue 阅读(141) 评论(0) 推荐(0) 编辑
摘要: /*** 打开内置音乐播放器*/private void getAudio() {Intent intent = new Intent(Intent.ACTION_VIEW);File sdcard = Environment.getExternalStorageDirectory();File audioFile = new File(sdcard.getPath() + "/music/young_for_you.mp3");intent.setDataAndType(Uri.fromFile(audioFile), "audio/mp3");sta 阅读全文
posted @ 2012-09-08 16:08 retacn_yue 阅读(161) 评论(0) 推荐(0) 编辑
摘要: /*** 可视区域** @time 上午10:42:39* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("unused")public class ClipCanvasSurfaceView extends SurfaceView implements Callback, Runnable {private boolean flag;// surfaceView状态标志位private SurfaceHolder sfh;private Paint paint;private Bitma 阅读全文
posted @ 2012-09-07 10:39 retacn_yue 阅读(150) 评论(0) 推荐(0) 编辑
摘要: /*** 位图** @author 岳振华**/@SuppressWarnings("unused")public class BitMapSrufaceView extends SurfaceView implements Callback, Runnable {private SurfaceHolder sfh;private Thread thread;private int surfaceW, surfaceH;private Paint paint;private Canvas canvas;private boolean flag;// surfaceView是 阅读全文
posted @ 2012-09-07 10:37 retacn_yue 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 43 下一页