|
Im having trouble aligning label to center top of the panel
Im Using MigLayout and tried following things but didnt worked
lbl is my label which I want to align in center top.
Code1
panel.add(lbl,"wrap,align center");
Code2
lbl.setHorizontalAlignment(JLabel.CENTER);
Thanks in advance.
EDIT:
I think I have found the answer
panel.add(lbl,"wrap,dock north");
modified 29-Aug-13 0:02am.
|
|
|
|
|
Hello there,
I am planning to develop a GUI that will run on Windows, Linux, Android & iOS. If am right, Java apps don't work on iOS. Is that correct?
Is there an alternative to that?
Which other tool works for GUI development on above mentioned 4 platforms?
Please advise.
Thanks in advance.
|
|
|
|
|
Browsers work on all of them. So something that runs in a browser with, with testing, work on all of them.
|
|
|
|
|
|
Hey guys. We've written a java based messaging program, and we'd like to have someone assist us in porting it to Android. We've tried with one developer, and he wasn't quite as great as he said he was, and we never got it working. We've got information about the program on our indiegogo page HERE. Currently, we're too busy to work on both the PC version and the Android version at the same time, as it would hinder our progress. Anyone interested, please let me know, either on here, or (faster) on Skype: methaneboy. Thanks and looking forward to finding someone to work with
|
|
|
|
|
|
Hmm. Seems like a grey area. I'll post there, and if a mod sees it fit to remove this one, so be it. But it would be nice to leave it in case it catches someone's eye.
|
|
|
|
|
|
Nothing grey about it, these forums are for technical programming questions.
Veni, vidi, abiit domum
|
|
|
|
|
I'll remove it then. I've been inactive for a long time. I misread the guidelines earlier today, on one rule. I thought it had said "Can someone write an application for me to do X". Somewhat dyslexic.
Actually. I can't delete it. I don't know what to do. If a mod finds this, can you lock/remove it?
|
|
|
|
|
how to send mail without using asp page and outlook...
Dilip
|
|
|
|
|
|
I am making a desktop application in swing.I want to add multiple tables in a text file or textarea. providing the table format, contents,rendering must be same . I am able to display the contents on text area but failed to keep the same formatting. I have to generate report at last which contains multiple tables of different sizes from different frames. Suggest me the solution or alternatives
|
|
|
|
|
TextArea does not support any html content. You can use a JEditorPane to display HTML or a JTextPane,
Regards
Shubhashish
|
|
|
|
|
Thanks Shubhashish, but i am not taking about html content in jtextarea,i want to add jTables in jTextArea or jTeaxtPane
|
|
|
|
|
|
can I perform a statistical computation in JTables?
Like I can get the summation of a column.
|
|
|
|
|
I have two arrays a[] and b[].
Where:
int a[]={3,1,1,1,7,4,6,6,3,1};
int b[]=new int[a.length];
Array size in actual problem can change.
The values in the array must be less then value of array length as seen.
The output must be:
b = 3 1 0 0 7 4 6 0 3 1
So basically if there is a sequence of same value in a[] then only 1st of its value must be placed at same index in b[] rest should be zero till the sequence exists.
Answer in java syntax will be helpful. Thank you in advance
|
|
|
|
|
So you need to take the first value of a and copy it to b , at the same time making a note of that value. Then take the next value and if it is different store it in b , if it is the same store 0 . Repeat until you reach the end of a . A simple for loop with an if statement should do it.
Use the best guess
|
|
|
|
|
|
I have a question with the performance of the LS method used with java class, ChannelSftp in a windows java program. The outputPath below is pointing to a UNIX folder:
JSch.setLogger(new MyLogger());
JSch jsch = new JSch();
Session session = null;
String password = "<Password>" + "";
//Create session for sftp files with remote server
session = jsch.getSession(username,server,22);
session.setConfig("StrictHostKeyChecking","no");
session.setPassword(password);
session.connect();
//Create channel for sftp files with remote server
Channel channel = session.openChannel("sftp");
channel.connect();
ChannelSftp sftpChannel = (ChannelSftp) channel;
sftpChannel.cd(sftpChannel.getHome());
sftpChannel.cd("<outputPath>");
Vector matchedFiles = sftpChannel.ls("<vuser>-<DateField>-" + "*PAIN*.xml");
The more files that are in the outputPath folder the longer the LS method takes. If I delete all files in outputPath, the method takes less than 1 second. As the number of files increase in outputPath, it may take much longer. With over 180K files, LS has taken 90+ seconds. I changed my code to do a get of a remote known UNIX file in the very large folder and it returned to the local folder in less than 1 second. In many cases my LS command with wildcards will return only 1 file and this may take a long time again depending on the number of files in the UNIX folder. The code I am developing is time sensitive and used to measure response times of a file handling system.
Anyone have any suggestions?
|
|
|
|
|
Member 10213693 wrote: Anyone have any suggestions? Yes, you need to understand that the ls command will read every entry in a directory in order to provide the list of files. This holds true even if using wildcards (e.g. ls mytype* ) as it needs to compare the name of every file. With a directory containing 180,000+ files this time will be significant. There is nothing you can do to reduce this other than divide the files set into subdirectories which all contain some easily searchable subset.
Use the best guess
|
|
|
|
|
Thanks for the quick response. It is not an option for me to split the files into sub directories or delete files as I process them. Are there any other java classes that can do what I am attempting to do that perform better
|
|
|
|
|
Member 10213693 wrote: Are there any other java classes that can do what I am attempting to do that perform better How could they? As I explained to you, the only way you can get a list of files is by processing every file in the directory and ignoring the ones that don't match your search pattern.
Use the best guess
|
|
|
|
|
Anyone have any idea's for a program that is useful any not too complected to make for example not something that can calculate the suns rotation every 3 seconds , maybe something help with games, utilities? maybe something that hasn't really been made before? any ideas?
|
|
|
|