Results 1 to 2 of 2
  1. #1
    arcelivez is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default Signals and slots in Java?


    Well I'm currently developing a database application with Java and here's what I need to do:
    let's say there's a tableView on form1 class and when I select an item in it, I want the class to somehow send a signal to a different class to execute a specific method. I kind of have found a way to write a listener for the table, but it can only execute a method inside a class, I need it to send some kind of a signal outside...

    I used to work with Qt C++ a little and it had such thing like signals and slots, where a class get's a signal connected to a slot(which is a normal method that has the ability to be called by a signal) and this way different classes could communicate if I remember right.

    So how do I do this in Java?

  2. #2
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    London, UK
    Blog Entries
    Rep Power


    So you mean you just need to call a method in one class from another?

    Java Code:
    public class myClass {
       public void doSomething() {
           //do something
    public class myOtherClass {
        public void doTheSameThing() {

Similar Threads

  1. Working with network signals
    By islamfunny in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 09-27-2008, 01:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts