- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
9 Posted Topics
Re: you can use function like this [CODE]<script type="text/javascript"> goOnConfirm(message, href) { if (confirm(message)) document.location.href = href; } </script>[/CODE] | |
Hello I'm working on simple text editor based on jTextPane i have no problem setting text color, size, font etc. but i have no idea how to get attributes from selected paragraph. i'v tried doing it by [CODE]myPane.getCharacterAttributes().getAttribute(key));[/CODE] but what shoud be the key? any help would be appreciated | |
Re: Well, first of all you created merge method outside of OrdArray class, so no wonder it doesn't work secondly it has wrong parameters, it should be [CODE]public void merge(OrdArray arr, OrdArray arr1)[/CODE] you dont need sizeArr parameter you can get the size by [CODE]arr.nElems[/CODE] and instead of giving destination array … | |
Re: this program needs a lot of improvements you dont have any customers array or even shop list for a single customer included in the program i fixed some major bugs so now it works fine at least for one item entered you obviously need to read more about oo programming … | |
Hello, Im trying to make jLabel component start default system browser and go to the specified page. I've tried to do this by adding listener to the jLabel and this part works fine, i have the problem with starting up the browser. I have only found system specific ways to … | |
Re: or use good old sprintf [CODE]new PrintfFormat("'%8s'").sprintf("text");[/CODE] where 8 is desired string length more [URL="http://java.sun.com/developer/technicalArticles/Programming/sprintf/"]here[/URL] | |
Re: hi, i spend many sleeples nights trying to solve it i did it this way: first create custom table model like this, and ascribe it to the table: [CODE]DefaultTableModel tableModel = new DefaultTableModel(null,new String[]{"Column1", "Column2", "Column3"});[/CODE] then to remove column from view you do [CODE]table.removeColumn(table.getColumnModel().getColumn(columnId));[/CODE] where columnId is column number … | |
Re: there. if it works good for you mark thread as solved, and please read more about java or oo programing in general. [CODE=java] import java.util.ArrayList; import java.util.Scanner; public class Program7 { //if you dont know how many data you want to store, use some dynamic structure //and make them availible … | |
Re: in src attribute you have to add "file:" at the begining like this [CODE]mas.addAttribute(HTML.Attribute.SRC, "file:"+ pictureFileName);[/CODE] pictureFileName contains an absolute path to file, but it should work with relative aswell also, i'v changed mas to SimpleAttributeSet and the code works fine ps. Your problem helped to solve me mine, so … |
The End.