- 浏览: 224295 次
- 性别:
- 来自: 西安
最新评论
-
xiaoxiaowuxian1:
终于找到了,感谢~
大话设计模式(带目录完整版)PDF -
jiaoronggui:
一键安装,很方便
BitNami Redmine Stack -
s21109:
不错 很详细
java文件复制 -
ryanflyer:
白下了半天,无法使用
大话设计模式(带目录完整版)PDF -
xbgd:
sunwang810812 写道根本不能用啊用7z解压试试
大话设计模式(带目录完整版)PDF
文章列表
----合并map---------------------
Map map1=new HashMap();
Map map2=new HashMap();
Map map3=new HashMap();
map1.put("1", "aa");
map1.put("2", "aa");
map2.put("1", "aa");
map ...
1. import java.util.*;
2. import org.dom4j.*;
3.
4. public class testxml {
5.
6. public static void main(String[] args) {
7. String xml =
8. " <file> " +
9. " < ...
Java进度条JProgressBar使用方法
package swimg;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLab ...
使用vbs调取jar包(解决无窗口的问题)
- 博客分类:
- VBS/BAT
set WshShell = WScript.CreateObject("WScript.Shell")
strRoot = WshShell.ExpandEnvironmentStrings("%******%")
WshShell.Exec strRoot+"\jre\bin\javaw -jar "+strRoot+"\client\123.jar"
2.用vbs调用bat
set WshShell = CreateObject("WScript.Shell")
cmd=WshShe ...
public double getCount(String str, String sign) {
// 查找某一字符串中str,特定子串sign的出现次数
if (str == null)
return 0;
double i = str.length();
str = str.replaceAll(sign, "");// 反串中的字符sign替换成""
return (i - str.length()) / sign.length();
} ...
package GoodSrc;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Output ...
void DeleteDirectory(CString strDir)
{
if(strDir.IsEmpty())
return;
// 首先删除文件及子文件夹
CFileFind ff;
BOOL bFound = ff.FindFile(strDir+"\\*", 0);
while(bFound)
{
bFound = ff.FindNextFile();
if(ff.GetFileName()=="." ...
import java.io.*;
import java.nio.channels.*;
public class LockFile {
public LockFile() {
}
public static void main(String[] args) throws Exception {
RandomAccessFile raf = new RandomAccessFile(new File("c:\\test.txt"), "rw");
FileChannel fc = raf ...
1. import javax.swing.JFrame;
2. import javax.swing.JRadioButton;
3. import javax.swing.JLabel;
4. import javax.swing.BoxLayout;
5. import javax.swing.ButtonGroup;
6. import java.awt.Container;
7. import java.awt.event.ActionListener;
8. import java.awt.e ...
package org.moon.admin;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JRadioButton;
public class JRadioButtonTest {
// 视图组件初始化
private static JFrame f = ...
JTextPane禁止换行的解决办法
- 博客分类:
- Swing相关
解决办法,重写下列方法:
Java:
public boolean getScrollableTracksViewportWidth() {
return false;
}
public void setSize(Dimension d) {
int parentWidth = this.getParent().getWidth();
if(parentWidth>d.width){
d.width = parentWidth;
}
super.setSize( ...
[url][/url]
package components;
/*
* TableRenderDemo.java requires no other files.
*/
import javax.swing.DefaultCellEditor;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.Abstra ...