Computing desk | ||
---|---|---|
< June 11 | << May | June | Jul >> | June 13 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Hello! I've been having a problem laying out text components in Java. What I'm trying to do is fill a JPanel with JLabels (which I guess don't technically qualify as "text components" in Java) and JEditorPanes so they all display vertically in the JPanel, one below the other, like a vertical list. I then want to embed the JPanel in a JScrollPane so that the user can scroll down and view all the messages contained in the JLabels and JEditorPanes, but I want to have all these components at a fixed width so that the user doesn't have to scroll sideways (horizontally). JLabels seem to accept this naturally, and wrap their text to the next line and stay within the JPanel's preferred width, but JEditorPanes seem to take advantage of the JPanel and JScrollPane and expand as much as they can to keep their text on the same line. I've been trying to lay out the JPanel with BoxLayout, and I've had a hard time finding a LayoutManager (or even just an idiom in Java, for that matter) that will force all the components in the JPanel to a set width, and let them wrap their text to take as much vertical space (height) as they need. I've tried extending JPanel to implement Scrollable, but I've only had limited success with that, and I'd like a layout technique that could do this even outside of a JScrollPane. Any suggestions? Thank you!-- el Aprel ( facta- facienda) 01:55, 12 June 2010 (UTC)
When installing Ubuntu on this machine (dual-boot now), I had two instances of Ubuntu - one 'normal' one and one 'recovery mode' one. Now I've got two of each. The only difference is the number that comes after them. One pair says 2.6.32.22 and the other pair says 2.6.32.21. Why is this, and is there anything I should do about it? -- KägeTorä - (影虎) ( TALK) 08:37, 12 June 2010 (UTC)
#make sure you're running the most up-to-date kernel: uname -a #check if the output contains 2.6.32-22, if not, reboot and select 2.6.32-22 in GRUB's menu.
#This will remove the older kernel and all packages that might belong to it sudo apt-get remove --purge $(dpkg -l linux-image-2.6.32-21*|awk '{print $2}'|grep linux) #If you see a message that you're about to do something stupid, that means the previous command misfired, #then by all means abort! If on the other hand, it simply prompts you "Y/n" to proceed, then hit Y. #This is just for good measure, the previous step should already have triggered it, but doing it twice #doesn't hurt - automatically update the GRUB boot menu sudo update-grub
Cheers. If it's not a massively pressing issue I think I'll leave it, then. A quick look at my recent posts will reveal that I'm not having a massive barrel of laughs with a dual-boot system at the moment, so if it's not broken I won't try to fix it. Cheers. -- KägeTorä - (影虎) ( TALK) 02:01, 13 June 2010 (UTC)
You should always use the latest if posible since it has been corrected for security problems and/or other bugs. You can see the cange in each version on https://launchpad.net/ubuntu/lucid/+source/linux/+changelog It is rather hard to understand every change but it can be intressting to see. Gr8xoz ( talk) 02:07, 14 June 2010 (UTC)
Is it possible on Windows to map a directory to a drive letter? So for example, "C:\whatever\" would be accessible via "F:\" ? 82.43.89.11 ( talk) 13:11, 12 June 2010 (UTC)
subst
command for that.
Paul (
Stansifer) 13:25, 12 June 2010 (UTC)
subst F: C:\whatever\
and press enter. Write exit
and press enter. Done. --
Andreas Rejbrand (
talk) 17:04, 12 June 2010 (UTC)
I remember, but cannot find, an extension for Mediawiki which allows the user to place mysql statements in the source for articles. These statements could query a mysql database (not the same one storing the wiki itself) and generate dynamic pages based on the results. Can anyone point me to an extension or how to do this? Thank you. -- Rajah ( talk) 14:22, 12 June 2010 (UTC)
How can I automatically enter a url into a file upload box with greasemonkey? The following works for the description field;
document.getElementsByName("com")[0].value = "Hello";
but when I try for the upload field (one of those little text boxes with "browse" next to it you usually use to navigate to the file)
document.getElementsByName("file")[0].value = "C:\123.jpg";
does not work. 82.43.89.11 ( talk) 15:09, 12 June 2010 (UTC)
You can't do that; this is a security restriction. Details here http://www.irt.org/script/1154.htm Arloz ( talk) 15:23, 12 June 2010 (UTC)
Can anyone explain how to do what I want in the following situation please? I have not been able to find any explainastion online.
There is a webpage with links to a series of files on it: file1.zip, file2.zip....file9.zip. I right click on file1.zip and select DownThemAll! from the menu. What do I do next to get it to download all these zip files but nothing else please? All I've managed to do is to download file1.zip to the directory I choose, and a lot of unwanted gif and html files seem to have been downloaded to some unknown location on my HD. Thanks 92.15.0.254 ( talk) 18:28, 12 June 2010 (UTC)
I keep getting a little pop-down toolbar everytime I visit a website in a different language on Google Chrome. It's annoying because it takes around a second (or maybe just a little bit less) to appear, making the page itself move down a centimetre or so, and very often causing me to click on something I didn't want to click on (due the the page moving). Is there any way to switch it off completely? It gives me the option to not translate that particular page or that particular language, but really I'd rather just get rid of it completely. Cheers. -- KägeTorä - (影虎) ( TALK) 19:30, 12 June 2010 (UTC)
I'm trying to connect a computer running Ubuntu 9.10 to my home wifi network. My Linksys wireless-B adapter works well enough to detect pretty much every network on my block, but I can't get authentication from my router (which is wireless-G, but that never stopped a Windows PC from using the same adapter to connect).
I've tried 64-bit WEP, 128-bit WEP, and WPA Personal encryption methods as well as two different wifi managers (the default Network Manager and something called WICD). The SSID is being broadcast. The process stalls when it gets to "waiting for authentication" (in WICD, as I haven't found a way to view Network Manager's connection status).
The encryption key is fine, since I can get a Wii and a Nintendo DS to connect just fine. I've triple-checked the key I'm putting in several times over again.
Any help or advice would be great. Multiple Google searches haven't turned up anything that A. I know how to do and B. works. Aylad ['ɑɪlæd] 23:21, 12 June 2010 (UTC)
sudo
before "make install". --
Rajah (
talk) 14:16, 13 June 2010 (UTC)
Computing desk | ||
---|---|---|
< June 11 | << May | June | Jul >> | June 13 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Hello! I've been having a problem laying out text components in Java. What I'm trying to do is fill a JPanel with JLabels (which I guess don't technically qualify as "text components" in Java) and JEditorPanes so they all display vertically in the JPanel, one below the other, like a vertical list. I then want to embed the JPanel in a JScrollPane so that the user can scroll down and view all the messages contained in the JLabels and JEditorPanes, but I want to have all these components at a fixed width so that the user doesn't have to scroll sideways (horizontally). JLabels seem to accept this naturally, and wrap their text to the next line and stay within the JPanel's preferred width, but JEditorPanes seem to take advantage of the JPanel and JScrollPane and expand as much as they can to keep their text on the same line. I've been trying to lay out the JPanel with BoxLayout, and I've had a hard time finding a LayoutManager (or even just an idiom in Java, for that matter) that will force all the components in the JPanel to a set width, and let them wrap their text to take as much vertical space (height) as they need. I've tried extending JPanel to implement Scrollable, but I've only had limited success with that, and I'd like a layout technique that could do this even outside of a JScrollPane. Any suggestions? Thank you!-- el Aprel ( facta- facienda) 01:55, 12 June 2010 (UTC)
When installing Ubuntu on this machine (dual-boot now), I had two instances of Ubuntu - one 'normal' one and one 'recovery mode' one. Now I've got two of each. The only difference is the number that comes after them. One pair says 2.6.32.22 and the other pair says 2.6.32.21. Why is this, and is there anything I should do about it? -- KägeTorä - (影虎) ( TALK) 08:37, 12 June 2010 (UTC)
#make sure you're running the most up-to-date kernel: uname -a #check if the output contains 2.6.32-22, if not, reboot and select 2.6.32-22 in GRUB's menu.
#This will remove the older kernel and all packages that might belong to it sudo apt-get remove --purge $(dpkg -l linux-image-2.6.32-21*|awk '{print $2}'|grep linux) #If you see a message that you're about to do something stupid, that means the previous command misfired, #then by all means abort! If on the other hand, it simply prompts you "Y/n" to proceed, then hit Y. #This is just for good measure, the previous step should already have triggered it, but doing it twice #doesn't hurt - automatically update the GRUB boot menu sudo update-grub
Cheers. If it's not a massively pressing issue I think I'll leave it, then. A quick look at my recent posts will reveal that I'm not having a massive barrel of laughs with a dual-boot system at the moment, so if it's not broken I won't try to fix it. Cheers. -- KägeTorä - (影虎) ( TALK) 02:01, 13 June 2010 (UTC)
You should always use the latest if posible since it has been corrected for security problems and/or other bugs. You can see the cange in each version on https://launchpad.net/ubuntu/lucid/+source/linux/+changelog It is rather hard to understand every change but it can be intressting to see. Gr8xoz ( talk) 02:07, 14 June 2010 (UTC)
Is it possible on Windows to map a directory to a drive letter? So for example, "C:\whatever\" would be accessible via "F:\" ? 82.43.89.11 ( talk) 13:11, 12 June 2010 (UTC)
subst
command for that.
Paul (
Stansifer) 13:25, 12 June 2010 (UTC)
subst F: C:\whatever\
and press enter. Write exit
and press enter. Done. --
Andreas Rejbrand (
talk) 17:04, 12 June 2010 (UTC)
I remember, but cannot find, an extension for Mediawiki which allows the user to place mysql statements in the source for articles. These statements could query a mysql database (not the same one storing the wiki itself) and generate dynamic pages based on the results. Can anyone point me to an extension or how to do this? Thank you. -- Rajah ( talk) 14:22, 12 June 2010 (UTC)
How can I automatically enter a url into a file upload box with greasemonkey? The following works for the description field;
document.getElementsByName("com")[0].value = "Hello";
but when I try for the upload field (one of those little text boxes with "browse" next to it you usually use to navigate to the file)
document.getElementsByName("file")[0].value = "C:\123.jpg";
does not work. 82.43.89.11 ( talk) 15:09, 12 June 2010 (UTC)
You can't do that; this is a security restriction. Details here http://www.irt.org/script/1154.htm Arloz ( talk) 15:23, 12 June 2010 (UTC)
Can anyone explain how to do what I want in the following situation please? I have not been able to find any explainastion online.
There is a webpage with links to a series of files on it: file1.zip, file2.zip....file9.zip. I right click on file1.zip and select DownThemAll! from the menu. What do I do next to get it to download all these zip files but nothing else please? All I've managed to do is to download file1.zip to the directory I choose, and a lot of unwanted gif and html files seem to have been downloaded to some unknown location on my HD. Thanks 92.15.0.254 ( talk) 18:28, 12 June 2010 (UTC)
I keep getting a little pop-down toolbar everytime I visit a website in a different language on Google Chrome. It's annoying because it takes around a second (or maybe just a little bit less) to appear, making the page itself move down a centimetre or so, and very often causing me to click on something I didn't want to click on (due the the page moving). Is there any way to switch it off completely? It gives me the option to not translate that particular page or that particular language, but really I'd rather just get rid of it completely. Cheers. -- KägeTorä - (影虎) ( TALK) 19:30, 12 June 2010 (UTC)
I'm trying to connect a computer running Ubuntu 9.10 to my home wifi network. My Linksys wireless-B adapter works well enough to detect pretty much every network on my block, but I can't get authentication from my router (which is wireless-G, but that never stopped a Windows PC from using the same adapter to connect).
I've tried 64-bit WEP, 128-bit WEP, and WPA Personal encryption methods as well as two different wifi managers (the default Network Manager and something called WICD). The SSID is being broadcast. The process stalls when it gets to "waiting for authentication" (in WICD, as I haven't found a way to view Network Manager's connection status).
The encryption key is fine, since I can get a Wii and a Nintendo DS to connect just fine. I've triple-checked the key I'm putting in several times over again.
Any help or advice would be great. Multiple Google searches haven't turned up anything that A. I know how to do and B. works. Aylad ['ɑɪlæd] 23:21, 12 June 2010 (UTC)
sudo
before "make install". --
Rajah (
talk) 14:16, 13 June 2010 (UTC)