Elya Matsunomi

Greenhorn
+ Follow
since Jan 23, 2019
Cows and Likes
Cows
Total received
1
In last 30 days
1
Total given
0
Likes
Total received
1
Received in last 30 days
1
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Elya Matsunomi

Seems like there's no solid solution to this long path name problem then.  Thanks for the help I really appreciate it.
1 week ago
I also tried to compare the windows explorer and java drag and drop on desktop and java drag and drop still has the problem. When I use windows explorer to drag a file with long path name to desktop, It successfully copied the file to desktop. Java, on the other hand, didn't successfully copy the file.

I also noticed that file path of the file with long file name is somewhat weird when I look at its properties in windows explorer

Portion of the path of file with long path name
D:\LOGICA~1\Uploads\

Portion of the path of file with short path name
D:\Logical(Not Installed) Files\Uploads\

Though, The path of the file with long path name that I'm getting in java is normal.

1 week ago
This code has lots of escape sequence errors. I fixed the errors in firstPage. Just do the same with the other pages

1 week ago
So, this is the file uploader without any items


This is the result if I drag and drop file with long path name using windows explorer

In this attempt. the file is successfully loaded to the file uploader all I need to do is to click the upload button

This is the result If I drag and drop file with long path name using java


The problem only happens in files with long path names. Windows explorer drag and drop and java drag and drop work well with file with short path name. When it comes to long path name, Windows explorer drag and drop still works but java drag and drop doesn't
1 week ago
No, I used notepad++ and it displayed the full path of the file.  The full path is also displayed in the web browser when I do drag and drop to the browser. However, File not found error appeared.
1 week ago
So, I encountered a problem where a file couldn't be copied from one place to another using drag and drop feature of java. I think the problem is the pathname because some files that I dragged got copied well except from files with long path names. The program is being run in Windows 7 and I'm aware of Windows 7 path name limit(which is 255-260 according to the sources that I've read). When I used windows explorer to drag files the file with long path name got copied successfully. My solution here is to inform the user about the long file path name and let them shorten the path name. I just wanna know if there's a solution to bypass that long path name problem like windows explorer does?

This is the length of the file that I was talking about


The program is also being used to drag files from the program to a file hosting website and website gives this error

1 week ago
listFiles() seems to be working with uppercase letters

Windows:


Using selectedFiles():


Using listFiles():


My problem here is that the links of the user's uploaded file follow the window's arrangement. Then the user will put those links in the textbox and then the program will put those links in each text file in each selected folder. I use a sorting algorithm in jdk to solve this problem for now.
1 week ago
So, I have this problem where JFileChooser kinda shuffle the selected files when there are uppercase letters.

This is the file arrangement in Windows:


When I used getSelectedFiles() this is the result:


I renamed the files by changing some letters to lowercase and this is the result:

Windows:


getSelectedFiles():


The second attempt seems to be working fine.

Is there a simple solution on this problem? Or I have no choice but to sort(case-insensitive) the files myself?

Edit:
My javac version: javac 11.0.1
My java version: openjdk version "11.0.1"  2018-10-16 (build 11.0.1+13)
1 week ago

Matthew Bendford wrote:Just from the top of my head, so it might be wrong: Setting the insets to 0 should do the trick.



It works mate thanks. I feel dumb right now, I didn't even think of setting insets to 0. Well, I'm fairly new using gridbaglayout that's my excuse

3 weeks ago
So, I've tried to remove those extra space between components but still no luck. I've played with weights,paddings,insets and still couldn't fix the problem. I want a label and a textfield to be close together with just a little gap between them like gridlayout does.Though, I tried using gridlayout but I couldn't resize the panel.

Here's the code



3 weeks ago
I examined the code earlier and found out that I just need to assign weights to my textarea and set the fill mode of textarea's constraints to GridBagConstraints.BOTH to achieve the result that I wanted.

1 month ago
Thanks for this. This is a nice solution. Could you explain to me how this codes work

mainPanelLayout.rowWeights = new double[]{ 0.0, 0.0, 0.0, 0.1, 0.0 };
mainPanelLayout.rowHeights = new int[]{ 7, 7, 7, 20, 7 };
mainPanelLayout.columnWeights = new double[]{ 0.0, 1.0, 0.0 };
mainPanelLayout.columnWidths = new int[]{ 7, 300, 7 };

I presume these codes override row and column wildth and height.However, this looks like an advance way to adjust width and height. The javadoc regarding this fields is lacking in details.
1 month ago
So, I have a panel with GridBagLayout  and I want a Jlabel to be placed on top of JTextArea. The problem is, if I put jlabel on top or bottom of jtextarea, the jtextarea will shrink. I tried to put jbutton instead of jlabel and the jtextarea wasn't shrinking. Here are some illustrations:

with jbutton


with jlabel


Code snippet

Is there a solution for this problem? or should I just use other layouts?
1 month ago

Tim Moores wrote:Are you supposed to code zip (de)compression yourself? If not, the java.util.zip package has classes that can do it for you.



Thanks for this! I didn't have any idea that java has this package. I thought I needed to create my own zip package.
Although, I wanna try to code compression algorithm by hand someday in the future.
Now, decompressing .rar files is the main problem. I'll let others do that functionality, It seems hard to do since winrar
is a proprietary software.
1 month ago
I have a project that needs to compress and decompress files. However, I don't know where to start learning compression algorithms.
The project requires compressing files in .zip format and decompress .zip and .rar files.
I would like to ask for some resources about compression algorithms.
1 month ago