User Profile

Collapse

Profile Sidebar

Collapse
ssaraceni
ssaraceni
Last Activity: Aug 3 '22, 09:45 AM
Joined: Sep 15 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • You can dinamically calculate row height with:
    Code:
    FontMetrics m=new JLabel().getFontMetrics(new Font("Calibri", Font.PLAIN, 24));
    Dimension d=new Dimension(m.stringWidth("AjWtYJ"),m.getHeight()+4);
    and then set preferred row height with:
    Code:
    tree.setRowHeight(d.height);
    See more | Go to post

    Leave a comment:


  • ssaraceni
    started a topic Repaint JTree
    in Java

    Repaint JTree

    Hello,
    I've a program with a JTree with JLayeredPane. During program execution I add a JPanel over the JTree on an higher layer.
    In this situation, when I change the content of JLabels over the JPanel, the JTree were repainted for corrisponding rows under the JLabel changed.

    How can I disable un-necessary repaint of JTree?

    EDIT: If I set JPanel to be opaque, the JTree isn't repainted, as I want; but I want to...
    See more | Go to post

  • ssaraceni
    replied to Java Wireless API
    in Java
    thanks for the reply, about setup connections what can I do with Java? Actually, I set a socket to a fixed IP with
    socket = new Socket(InetAddr ess.getByName(" 192.168.1.94"), 1100);
    Do you know if is possible to change wireless connected network with other languages, like VB.net or C#, or others? Thanks.
    See more | Go to post

    Leave a comment:


  • ssaraceni
    started a topic Java Wireless API
    in Java

    Java Wireless API

    Hi, is there in Java any command or API for manage wireless connections?
    I want to create an application for auto-scan wireless networks and manage connection profiles (password, ip...).
    I'm using socket for communication between two hosts, but now I want to add a level for manage the wireless connection, to by-pass the windows XP wireless manage application.
    Where can I find references or examples? Thanks.
    See more | Go to post

  • ssaraceni
    started a topic VB6 and GDI

    VB6 and GDI

    Hi, I've a software developed using VB5 and GDI, it works fine on WIN98, but has a lot of problem with WIN2000 and WinXP.
    In details, debugging the source code I see that with Win2000, GDI functions like:
    Code:
    Declare Function PtInRegion Lib "gdi32" (ByVal hRgn As Long, ByVal x As Long, ByVal y As Long) As Long
    doesn't work!
    I'm not an expert about GDI, so I can't understand why the software works well...
    See more | Go to post

  • ssaraceni
    replied to Insert item on TreeViewer
    in Java
    Now I've solved the problem: after getting selected item using the getTree().getSe lection()[0];
    I get the list of child items with selected.getIte ms(); and after that I scan the array finding the position of the previous item, so I can insert the new item on the position searched
    See more | Go to post

    Leave a comment:


  • ssaraceni
    started a topic Insert item on TreeViewer
    in Java

    Insert item on TreeViewer

    I need to add an element on a tree object in an Eclipse plug-in into a specified position.

    I use org.eclipse.jfa ce.viewers.Tree Viewer for the viewer.
    I want to insert an item before the current selected one, for having the selected item I use the viewer.getTree( ).getSelection( )[0] instruction, but I can't find the right position. if I use the viewer.getTree( ).getItems() I only receive the root elements and not all items (also...
    See more | Go to post

  • ssaraceni
    replied to open Dialog in Eclipse Plugin
    in Java
    I've solved the problem to wait for user interaction in dialog window, simply using the open() method. Now I'll check how to show properly the content into the dialog.
    See more | Go to post

    Leave a comment:


  • ssaraceni
    started a topic open Dialog in Eclipse Plugin
    in Java

    open Dialog in Eclipse Plugin

    Hi, I'm programming an eclipse plugin.
    I need to show a dialog window when user select an item on context menu over the editor.
    I execute the user action into run method of class MyAction that extendsorg.ecli pse.jface.actio n.Action.

    I need to show the dialog and wait until user confirm selection on the dialog, so I want to know how to show the dialog and method to write into the dialog to show my contents (a table, that...
    See more | Go to post

  • ssaraceni
    replied to Progress Monitor doesn't update
    in Java
    I've created a new Thread into actionPerformed that calls the method, :
    Code:
    class ButtonHandler implements ActionListener{
    		public void actionPerformed (ActionEvent e){
    ....
    Thread op=new Thread(){                                         
    public void run(){                                             Global.updateProcess();                                         
    }
    ...
    See more | Go to post

    Leave a comment:


  • ssaraceni
    replied to Progress Monitor doesn't update
    in Java
    yes, the method is started from an actionlistener, that handles actions for some buttons on a panel of my GUI.
    See more | Go to post

    Leave a comment:


  • ssaraceni
    started a topic Progress Monitor doesn't update
    in Java

    Progress Monitor doesn't update

    Hi, I'm trying to use a ProgressMonitor in my Java application, to show information during a long process, but is only visible the title and the frame of the ProgressMonitor .

    Code:
    public static void updateProcess(){
                ... 
    //code
                ....
                    ProgressMonitor progressMon=new ProgressMonitor(null, "Operation in progress...", "", 0, 3600);
    ...
    See more | Go to post

  • ssaraceni
    replied to Need a Java Graph Library
    in Java
    Thanks for the replies,
    I want to models element like in the image I've posted on top, I need to create an XSD editor, so I need to graph XSD elements in a visual graph, I've used JFreeGraph before, but it doesn't be useful for this project now.

    Also can be useful source code of Editix, but I haven't found it.

    best regards.
    See more | Go to post

    Leave a comment:


  • ssaraceni
    replied to How to use a VB net DLL into JAVA
    in Java
    thanks for reply, but how can I wrap the DLL using C++??
    The DLL was written for WinCE 6.0 and the Java and VB.net application is running on WinCE6.0.
    See more | Go to post

    Leave a comment:


  • ssaraceni
    started a topic Need a Java Graph Library
    in Java

    Need a Java Graph Library

    Hi, I need a Java library for graphically visualize and modify an XSD file, like this:




    where can I find it?

    Thanks...
    See more | Go to post

  • ssaraceni
    started a topic How to use a VB net DLL into JAVA
    in Java

    How to use a VB net DLL into JAVA

    Hi, i need to use a DLL into my Java application. I don't have the source code for the DLL, only a VB.NET application that uses the method I need to invoke into my Java application.
    But how can I call the DLL method from Java?

    Thanks.
    See more | Go to post

  • ssaraceni
    started a topic Using VB.net DLL into C++
    in .NET

    Using VB.net DLL into C++

    Hi, I'm trying to use a VB.net DLL into my Java application using JNI, so I need to create a c++ class to call the DLL from C++.
    How can I do this?
    Thanks.
    See more | Go to post

  • ssaraceni
    started a topic Parsing all XML files with Xerces J
    in Java

    Parsing all XML files with Xerces J

    Hi, I want to open XML files, also non well formed ones, to show the XML tags into my java application.
    Actually I'm using Xerces2-J to parse XML files, but if I try to open a non-well formed file, the parser throws the SaxException.
    How can I open this files?
    Thanks
    See more | Go to post
No activity results to display
Show More
Working...