forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderHelp.java
More file actions
62 lines (54 loc) · 1.6 KB
/
OrderHelp.java
File metadata and controls
62 lines (54 loc) · 1.6 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package cars;
import java.io.*;
public class OrderHelp {
String table;
String fla;
File files;
String title;
String names;
int size;
int height1;
int height2;
public OrderHelp() {
}
public void setfile(String path,String name){
try{
files=new File(path,name);
size=(int)files.length();
FileInputStream filein=new FileInputStream(files);
byte[] buffer=new byte[size];
filein.read(buffer);
fla=new String(buffer);
}
catch(Exception e){
e.printStackTrace();
}
}
public void setname(String name,String name2){
title=name;
names=name2;
}
public void setsize(int ht,int ht2){
height1=ht;
height2=ht2;
}
public String gettable(){
try{
table="";
table=table+"<table width='580' height='"+height1+"' border='1' cellpadding='0' cellspacing='0'>";
table=table+"<tr bgcolor='#FFCC99'>";
table=table+"<td height='20'> <a href='#' style='color:#000000 '>"+title+"</a> -->> "+names+"</td>";
table=table+"</tr><tr><td>";
table=table+"<table width='480' height='"+height2+"' border='0' align='center' cellpadding='0' cellspacing='0'>";
table=table+"<tr><td height='40' align='center'>";
table=table+"<div align='center' class='bottm' style='font-size: 16px;color: #FF0000;font-weight: bold;width:130;'>"+names+"</div></td>";
table=table+"</tr><tr><td height=20> </td></tr><tr><td valign='top'> <pre> ";
table=table+fla+"</pre></td></tr></table></td></tr></table>";
return table;
}
catch(Exception e){
e.printStackTrace();
}
return null;
}
}