apriori2 java_frame2.java 源代码在线查看 - 经典apriori算法 资源下载 虫虫电子下载站...

package apriori;import java.awt.BorderLayout;import java.awt.Font;import java.io.BufferedReader;import java.io.FileReader;import javax.swing.*;import com.borland.jbcl.layout.XYConstraints;import com.borland.jbcl.layout.XYLayout;public class Frame2 extends JFrame { JPanel jPanel1 = new JPanel(); JPanel jPanel2 = new JPanel(); JTextArea jTextArea1 = new JTextArea(); JLabel jLabel1 = new JLabel(); XYLayout xYLayout3 = new XYLayout(); JScrollPane jScrollPane1 = new JScrollPane(); XYLayout xYLayout1 = new XYLayout(); BorderLayout borderLayout1 = new BorderLayout(); JTextField jTextField1 = new JTextField(); JLabel jLabel2 = new JLabel(); static String time; public static String mm(String a) { time=a; return a; } public Frame2() { try { jbInit( ); } catch (Exception exception) { exception.printStackTrace(); } } private void jbInit( ) throws Exception { getContentPane().setLayout(borderLayout1); jLabel2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15)); jLabel2.setText("挖掘时间:"); jScrollPane1.getViewport().add(jTextArea1); jTextField1.setText(time+"ms"); jPanel2.setLayout(xYLayout1); jLabel1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 21)); jLabel1.setText("挖掘结果如下"); jPanel1.setLayout(xYLayout3); jPanel2.add(jScrollPane1, new XYConstraints(2, 5, 397, 201)); this.getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER); this.getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH); jPanel1.add(jLabel1, new XYConstraints(1, 1, 398, 73)); jPanel1.add(jLabel2, new XYConstraints(48, 51, 97, 26)); jPanel1.add(jTextField1, new XYConstraints(124, 53, 142, -1)); } public void main(){ try { BufferedReader read = new BufferedReader(new FileReader("c:/out.txt")); String line; StringBuffer buffer = new StringBuffer(); while ((line = read.readLine())!= null) { buffer.append(line); buffer.append('\n'); } jTextArea1.setText(buffer.toString()); }catch(Exception e){ e.printStackTrace(); } }}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值