-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewModel.java
39 lines (35 loc) · 926 Bytes
/
newModel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.zip.*;
import java.util.zip.ZipEntry.*;
import java.io.IOException;
import java.io.*;
import javax.swing.table.*;
import javax.swing.border.*;
import java.util.*;
import javax.swing.filechooser.FileSystemView;
import javax.swing.tree.*;
import java.util.*;
import java.text.*;
import java.net.*;
import java.awt.datatransfer.*;
import java.util.Vector;
class newModel extends DefaultListModel
{
public newModel(File[] f)
{
for(int i= 0; i< f.length; i++)
{
if(f[i].isDirectory())
{
addElement(new Object[] {f[i].getName(),new ImageIcon("dir.gif")});
}
else
{
addElement(new Object[] {f[i].getName(),new ImageIcon("fil.gif")});
}
}
}
}