当前位置: 技术问答>java相关
一个关于取得本地文件路径的问题?
来源: 互联网 发布时间:2015-07-25
本文导语: 我的系统有一个部分需要做一个象windows里打开保存文件的对话框的applet,请问我该怎样做? | import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.io.*; import jav...
我的系统有一个部分需要做一个象windows里打开保存文件的对话框的applet,请问我该怎样做?
|
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.io.*;
import javax.swing.tree.*;
import javax.swing.border.*;
import java.applet.*;
import javax.swing.JPanel;
import java.net.*;
import java.io.File;
import java.util.*;
import java.util.Vector;
import java.sql.*;
import oracle.jdbc.driver.*;
import java.util.Date;
public class TheTree extends JFrame
{
Container container;
String username = "";
int userid;
static JScrollPane treescroll=null;
static SqlTree tree = null;
static JScrollPane panelscroll = null;
static SqlPanel panel = null;
static JSplitPane totalsplit = null;
DBPool pool = null;
Integer myhide;
public TheTree()
{
super("沈阳通资源管理系统");
container = this.getContentPane();
tree = new SqlTree();
myhide = tree.myhide;
tree.container = container;
treescroll = tree.treescroll;
panel = new SqlPanel();
panel.myhide = myhide;
panelscroll = new JScrollPane(panel);
pool = tree.pool;
panel.pool = tree.pool;
panel.scrollpane = panelscroll;
//panelscroll = panel.panelscroll;
tree.panel = panel;
tree.panelscroll = panelscroll;
totalsplit = new JSplitPane(
JSplitPane.HORIZONTAL_SPLIT,
true,
treescroll,
panelscroll);
totalsplit.setOneTouchExpandable(true);
totalsplit.setDividerLocation(200);
container.add(totalsplit);
WindowsEventListener close = new WindowsEventListener();
addWindowListener(close);
close.pool = tree.pool;
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
setSize(800,580);
show();
int i = 0;
for(i =0;i
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.io.*;
import javax.swing.tree.*;
import javax.swing.border.*;
import java.applet.*;
import javax.swing.JPanel;
import java.net.*;
import java.io.File;
import java.util.*;
import java.util.Vector;
import java.sql.*;
import oracle.jdbc.driver.*;
import java.util.Date;
public class TheTree extends JFrame
{
Container container;
String username = "";
int userid;
static JScrollPane treescroll=null;
static SqlTree tree = null;
static JScrollPane panelscroll = null;
static SqlPanel panel = null;
static JSplitPane totalsplit = null;
DBPool pool = null;
Integer myhide;
public TheTree()
{
super("沈阳通资源管理系统");
container = this.getContentPane();
tree = new SqlTree();
myhide = tree.myhide;
tree.container = container;
treescroll = tree.treescroll;
panel = new SqlPanel();
panel.myhide = myhide;
panelscroll = new JScrollPane(panel);
pool = tree.pool;
panel.pool = tree.pool;
panel.scrollpane = panelscroll;
//panelscroll = panel.panelscroll;
tree.panel = panel;
tree.panelscroll = panelscroll;
totalsplit = new JSplitPane(
JSplitPane.HORIZONTAL_SPLIT,
true,
treescroll,
panelscroll);
totalsplit.setOneTouchExpandable(true);
totalsplit.setDividerLocation(200);
container.add(totalsplit);
WindowsEventListener close = new WindowsEventListener();
addWindowListener(close);
close.pool = tree.pool;
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
setSize(800,580);
show();
int i = 0;
for(i =0;i