Skip to content

Commit bf5c273

Browse files
committed
optimized
2 parents 45b1b99 + 0f9d468 commit bf5c273

10 files changed

+1037
-144
lines changed

File_Sharing/Client_Main.java

+45-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<<<<<<< HEAD
12
/*
23
* To change this license header, choose License Headers in Project Properties.
34
* To change this template file, choose Tools | Templates
@@ -6,6 +7,10 @@
67
package file_sharing;
78
import java.awt.event.WindowAdapter;
89
import java.awt.event.WindowEvent;
10+
=======
11+
package file_sharing;
12+
13+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
914
import java.io.DataInputStream;
1015
import java.io.DataOutputStream;
1116
import java.io.File;
@@ -22,6 +27,7 @@
2227
import javax.swing.JFileChooser;
2328

2429
import javax.swing.JFileChooser;
30+
<<<<<<< HEAD
2531
import javax.swing.JFrame;
2632
import javax.swing.JOptionPane;
2733

@@ -35,16 +41,19 @@
3541
class Client {
3642

3743

44+
=======
45+
class Client{
46+
47+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
3848
}
49+
3950
public class Client_Main extends javax.swing.JFrame {
4051

41-
public Socket socket = null;
42-
private DataInputStream input = null;
52+
public Socket socket = null;
53+
private DataInputStream input = null;
4354
private DataOutputStream out = null;
44-
public void setupconnection(String ip,int port) {
45-
46-
47-
try
55+
public void setupconnection(String ip,int port){
56+
try
4857
{
4958
this.socket = new Socket(ip, port);
5059
System.out.println("Connection Established!");
@@ -58,25 +67,31 @@ public void setupconnection(String ip,int port) {
5867
{
5968
System.out.println(i);
6069
}
70+
<<<<<<< HEAD
6171
}
6272

6373

74+
=======
75+
}
76+
77+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
6478
/**
6579
* Creates new form Client_Main
6680
*/
6781
public Client_Main() {
6882
initComponents();
6983
}
84+
<<<<<<< HEAD
7085

7186
/**
7287
* This method is called from within the constructor to initialize the form.
7388
* WARNING: Do NOT modify this code. The content of this method is always
7489
* regenerated by the Form Editor.
7590
*/
91+
=======
92+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
7693
@SuppressWarnings("unchecked")
77-
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
7894
private void initComponents() {
79-
8095
ipaddress = new javax.swing.JTextField();
8196
port_no = new javax.swing.JTextField();
8297
connect = new javax.swing.JButton();
@@ -161,15 +176,25 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
161176
);
162177

163178
pack();
164-
}// </editor-fold>//GEN-END:initComponents
179+
}
165180

181+
<<<<<<< HEAD
166182
private void connectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_connectActionPerformed
167183
// TODO add your handling code here:
168184

185+
=======
186+
private void connectActionPerformed(java.awt.event.ActionEvent evt) throws IOException {
187+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
169188
ip = this.ipaddress.getText();
170189
pn = Integer.parseInt(this.port_no.getText());
171190
user = this.username.getText();
172191
this.setupconnection(ip, pn);
192+
<<<<<<< HEAD
193+
=======
194+
Logger logger = Logger.getLogger("mylog");
195+
196+
FileHandler fileHandler = new FileHandler("E:\\file_sharing\\File_Sharing\\Filapplogg.log", true);
197+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
173198

174199
if(this.socket!=null && user!=null){
175200

@@ -200,20 +225,20 @@ public void windowClosing(WindowEvent evt) {
200225
}
201226

202227

203-
}//GEN-LAST:event_connectActionPerformed
228+
}
204229

205230
private void port_noActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_port_noActionPerformed
206231
// TODO add your handling code here:
207-
}//GEN-LAST:event_port_noActionPerformed
208-
232+
}
209233
private void usernameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_usernameActionPerformed
210234
// TODO add your handling code here:
211-
}//GEN-LAST:event_usernameActionPerformed
235+
}
212236

213237
private void ipaddressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ipaddressActionPerformed
214238
// TODO add your handling code here:
215-
}//GEN-LAST:event_ipaddressActionPerformed
239+
}
216240

241+
<<<<<<< HEAD
217242
/**
218243
* @param args the command line arguments
219244
*/
@@ -223,6 +248,9 @@ public static void main(String args[]) {
223248
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
224249
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
225250
*/
251+
=======
252+
public static void main(String args[]) {
253+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
226254
try {
227255
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
228256
if ("Nimbus".equals(info.getName())) {
@@ -251,13 +279,15 @@ public void run() {
251279
private String ip;
252280
private int pn;
253281
private String user;
282+
<<<<<<< HEAD
254283
// Variables declaration - do not modify//GEN-BEGIN:variables
284+
=======
285+
>>>>>>> 0f9d468f3e4b42a1a7e306420f7e5335f9eee4ea
255286
private javax.swing.JButton connect;
256287
private javax.swing.JTextField ipaddress;
257288
private javax.swing.JLabel jLabel1;
258289
private javax.swing.JLabel jLabel2;
259290
private javax.swing.JLabel jLabel3;
260291
private javax.swing.JTextField port_no;
261292
private javax.swing.JTextField username;
262-
// End of variables declaration//GEN-END:variables
263293
}

File_Sharing/Filapplogg.log

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
Apr 16, 2018 12:27:04 AM file_sharing.User_window Send_fileActionPerformed
2+
INFO: Rabb Da Banda Ahen (1).mp3 16/04/2018 00:27:04 pm send gha
3+
Apr 16, 2018 12:28:37 AM file_sharing.User_window$3 run
4+
INFO: Azhar_ OYE OYE.mp4 16/04/2018 00:28:37 am recieve Dax
5+
Apr 16, 2018 12:28:37 AM file_sharing.User_window$3 run
6+
INFO: Azhar_ OYE OYE.mp4 16/04/2018 00:28:37 am recieve Dax
7+
Apr 16, 2018 12:34:11 AM file_sharing.User_window Send_fileActionPerformed
8+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:11 pm send gha
9+
Apr 16, 2018 12:34:11 AM file_sharing.User_window Send_fileActionPerformed
10+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:11 pm send gha
11+
Apr 16, 2018 12:34:11 AM file_sharing.User_window Send_fileActionPerformed
12+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:11 pm send gha
13+
Apr 16, 2018 12:34:16 AM file_sharing.User_window Send_fileActionPerformed
14+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:16 pm send gha
15+
Apr 16, 2018 12:34:16 AM file_sharing.User_window Send_fileActionPerformed
16+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:16 pm send gha
17+
Apr 16, 2018 12:34:16 AM file_sharing.User_window Send_fileActionPerformed
18+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:16 pm send gha
19+
Apr 16, 2018 12:34:16 AM file_sharing.User_window Send_fileActionPerformed
20+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:16 pm send gha
21+
Apr 16, 2018 12:34:17 AM file_sharing.User_window Send_fileActionPerformed
22+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:17 pm send gha
23+
Apr 16, 2018 12:34:17 AM file_sharing.User_window Send_fileActionPerformed
24+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:17 pm send gha
25+
Apr 16, 2018 12:34:17 AM file_sharing.User_window Send_fileActionPerformed
26+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:17 pm send gha
27+
Apr 16, 2018 12:34:17 AM file_sharing.User_window Send_fileActionPerformed
28+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:17 pm send gha
29+
Apr 16, 2018 12:34:17 AM file_sharing.User_window Send_fileActionPerformed
30+
INFO: - Saavn.com - Listen to Indian Music for free_3.MP3 16/04/2018 00:34:17 pm send gha
31+
Apr 16, 2018 12:45:27 AM file_sharing.User_window$3 run
32+
INFO: 09 - Raabta [Songspk.name] (1).mp3 16/04/2018 00:45:27 am recieve Dax
33+
Apr 16, 2018 12:45:41 AM file_sharing.User_window$3 run
34+
INFO: 09 - Raabta [Songspk.name] (1).mp3 16/04/2018 00:45:41 am recieve Dax
35+
Apr 16, 2018 12:45:41 AM file_sharing.User_window$3 run
36+
INFO: 09 - Raabta [Songspk.name] (1).mp3 16/04/2018 00:45:41 am recieve Dax
37+
Apr 16, 2018 12:45:50 AM file_sharing.User_window$3 run
38+
INFO: 09 - Raabta [Songspk.name] (1).mp3 16/04/2018 00:45:50 am recieve Dax
39+
Apr 16, 2018 12:45:50 AM file_sharing.User_window$3 run
40+
INFO: 09 - Raabta [Songspk.name] (1).mp3 16/04/2018 00:45:50 am recieve Dax
41+
Apr 16, 2018 12:45:50 AM file_sharing.User_window$3 run
42+
INFO: 09 - Raabta [Songspk.name] (1).mp3 16/04/2018 00:45:50 am recieve Dax
43+
Apr 16, 2018 12:50:03 AM file_sharing.User_window Send_fileActionPerformed
44+
INFO: README.md 16/04/2018 00:50:03 pm send Avkatran
45+
Apr 16, 2018 12:50:40 AM file_sharing.User_window$3 run
46+
INFO: 2015020317 (2).pdf 16/04/2018 00:50:40 am recieve Dax
47+
Apr 16, 2018 12:50:40 AM file_sharing.User_window$3 run
48+
INFO: 2015020317 (2).pdf 16/04/2018 00:50:40 am recieve Dax
49+
Apr 16, 2018 12:52:05 AM file_sharing.User_window Send_fileActionPerformed
50+
INFO: package-lock.json 16/04/2018 00:52:05 pm send Avkatran
51+
Apr 16, 2018 12:52:05 AM file_sharing.User_window Send_fileActionPerformed
52+
INFO: package-lock.json 16/04/2018 00:52:05 pm send Avkatran
53+
Apr 16, 2018 12:52:05 AM file_sharing.User_window Send_fileActionPerformed
54+
INFO: package-lock.json 16/04/2018 00:52:05 pm send Avkatran
55+
Apr 16, 2018 12:52:14 AM file_sharing.User_window Send_fileActionPerformed
56+
INFO: package-lock.json 16/04/2018 00:52:14 pm send Avkatran
57+
Apr 16, 2018 12:52:14 AM file_sharing.User_window Send_fileActionPerformed
58+
INFO: package-lock.json 16/04/2018 00:52:14 pm send Avkatran
59+
Apr 16, 2018 12:52:14 AM file_sharing.User_window Send_fileActionPerformed
60+
INFO: package-lock.json 16/04/2018 00:52:14 pm send Avkatran
61+
Apr 16, 2018 12:52:14 AM file_sharing.User_window Send_fileActionPerformed
62+
INFO: package-lock.json 16/04/2018 00:52:14 pm send Avkatran
63+
Apr 16, 2018 12:53:02 AM file_sharing.User_window$3 run
64+
INFO: analytic geometry.pdf 16/04/2018 00:53:02 am recieve Dax
65+
Apr 16, 2018 12:53:02 AM file_sharing.User_window$3 run
66+
INFO: analytic geometry.pdf 16/04/2018 00:53:02 am recieve Dax
67+
Apr 16, 2018 12:53:02 AM file_sharing.User_window$3 run
68+
INFO: analytic geometry.pdf 16/04/2018 00:53:02 am recieve Dax
69+
Apr 16, 2018 12:53:02 AM file_sharing.User_window$3 run
70+
INFO: analytic geometry.pdf 16/04/2018 00:53:02 am recieve Dax
71+
Apr 16, 2018 12:53:02 AM file_sharing.User_window$3 run
72+
INFO: analytic geometry.pdf 16/04/2018 00:53:02 am recieve Dax
73+
Apr 16, 2018 12:56:06 AM file_sharing.User_window$3$1 run
74+
INFO: DBMS_Project_Description.pdf 16/04/2018 00:56:06 am recieve A
75+
Apr 16, 2018 12:56:48 AM file_sharing.User_window Send_fileActionPerformed
76+
INFO: b.py 16/04/2018 00:56:48 pm send Av
77+
Apr 16, 2018 12:56:48 AM file_sharing.User_window Send_fileActionPerformed
78+
INFO: b.py 16/04/2018 00:56:48 pm send Av
79+
Apr 16, 2018 12:57:36 AM file_sharing.User_window$3$1 run
80+
INFO: SchemaDiagram.pdf 16/04/2018 00:57:36 am recieve A
81+
Apr 16, 2018 12:57:36 AM file_sharing.User_window$3$1 run
82+
INFO: SchemaDiagram.pdf 16/04/2018 00:57:36 am recieve A
83+
Apr 16, 2018 12:57:36 AM file_sharing.User_window$3$1 run
84+
INFO: SchemaDiagram.pdf 16/04/2018 00:57:36 am recieve A
85+
Apr 16, 2018 1:03:38 AM file_sharing.User_window$3 run
86+
INFO: 4thsemPaymenteReceipt.pdf 16/04/2018 01:03:38 am recieve Jbjbj
87+
Apr 16, 2018 1:05:40 AM file_sharing.User_window Send_fileActionPerformed
88+
INFO: abstractdata.c 16/04/2018 01:05:40 pm send AV
89+
Apr 16, 2018 1:05:40 AM file_sharing.User_window Send_fileActionPerformed
90+
INFO: abstractdata.c 16/04/2018 01:05:40 pm send AV

File_Sharing/File_sharing.java

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
package file_sharing;
7+
8+
/**
9+
*
10+
* @author Av Singh
11+
*/
12+
public class File_sharing {
13+
14+
/**
15+
* @param args the command line arguments
16+
*/
17+
public static void main(String[] args) {
18+
// TODO code application logic here
19+
}
20+
21+
}

File_Sharing/Progressionbar.java

-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
5-
*/
61
package file_sharing;
72

83
import java.awt.BasicStroke;
@@ -17,22 +12,13 @@
1712
import java.util.Random;
1813
import javax.swing.JPanel;
1914

20-
/**
21-
*
22-
* @author rockstar
23-
*/
2415
public class Progressionbar extends JPanel {
25-
26-
/**
27-
* @param args the command line arguments
28-
*/
2916

3017
float progress = 0;
3118

3219
@Override protected void paintComponent (Graphics g) {
3320
AffineTransform at = new AffineTransform();
3421
super.paintComponent(g);
35-
3622
Graphics2D g2 = (Graphics2D) g;
3723
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
3824
AffineTransform save_ctx = g2.getTransform();

0 commit comments

Comments
 (0)